[Lldb-commits] [lldb] r192116 - --raw was not always doing the right thing w.r.t. one-lining children. This checkin fixes that

Enrico Granata egranata at apple.com
Mon Oct 7 10:59:03 PDT 2013


Author: enrico
Date: Mon Oct  7 12:59:03 2013
New Revision: 192116

URL: http://llvm.org/viewvc/llvm-project?rev=192116&view=rev
Log:
--raw was not always doing the right thing w.r.t. one-lining children. This checkin fixes that


Modified:
    lldb/trunk/include/lldb/DataFormatters/ValueObjectPrinter.h
    lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp

Modified: lldb/trunk/include/lldb/DataFormatters/ValueObjectPrinter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/ValueObjectPrinter.h?rev=192116&r1=192115&r2=192116&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/ValueObjectPrinter.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/ValueObjectPrinter.h Mon Oct  7 12:59:03 2013
@@ -43,6 +43,7 @@ struct DumpValueObjectOptions
     bool m_hide_root_type;
     bool m_hide_name;
     bool m_hide_value;
+    bool m_be_raw;
     
     DumpValueObjectOptions() :
     m_max_ptr_depth(0),
@@ -61,7 +62,8 @@ struct DumpValueObjectOptions
     m_root_valobj_name(),
     m_hide_root_type(false),  // provide a special compact display for "po"
     m_hide_name(false), // provide a special compact display for "po"
-    m_hide_value(false) // provide a special compact display for "po"
+    m_hide_value(false), // provide a special compact display for "po"
+    m_be_raw(false)
     {}
     
     static const DumpValueObjectOptions
@@ -89,7 +91,8 @@ struct DumpValueObjectOptions
     m_root_valobj_name(rhs.m_root_valobj_name),
     m_hide_root_type(rhs.m_hide_root_type),
     m_hide_name(rhs.m_hide_name),
-    m_hide_value(rhs.m_hide_value)
+    m_hide_value(rhs.m_hide_value),
+    m_be_raw(rhs.m_be_raw)
     {}
     
     DumpValueObjectOptions&
@@ -189,6 +192,7 @@ struct DumpValueObjectOptions
             SetIgnoreCap(true);
             SetHideName(false);
             SetHideValue(false);
+            m_be_raw = true;
         }
         else
         {
@@ -197,6 +201,7 @@ struct DumpValueObjectOptions
             SetIgnoreCap(false);
             SetHideName(false);
             SetHideValue(false);
+            m_be_raw = false;
         }
         return *this;
     }

Modified: lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp?rev=192116&r1=192115&r2=192116&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp (original)
+++ lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp Mon Oct  7 12:59:03 2013
@@ -581,7 +581,7 @@ ValueObjectPrinter::PrintChildrenIfNeede
     
     uint32_t curr_ptr_depth = m_ptr_depth;
     bool print_children = ShouldPrintChildren (is_failed_description,curr_ptr_depth);
-    bool print_oneline = (curr_ptr_depth > 0 || options.m_show_types) ? false : DataVisualization::ShouldPrintAsOneLiner(*m_valobj);
+    bool print_oneline = (curr_ptr_depth > 0 || options.m_show_types || options.m_be_raw) ? false : DataVisualization::ShouldPrintAsOneLiner(*m_valobj);
     
     if (print_children)
     {





More information about the lldb-commits mailing list