[Lldb-commits] [lldb] r153608 - in /lldb/trunk: include/lldb/Core/ValueObject.h source/Commands/CommandObjectExpression.cpp test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
Enrico Granata
egranata at apple.com
Wed Mar 28 15:17:37 PDT 2012
Author: enrico
Date: Wed Mar 28 17:17:37 2012
New Revision: 153608
URL: http://llvm.org/viewvc/llvm-project?rev=153608&view=rev
Log:
Fixing an issue where saying 'po foo' made both the summary and the description for foo come out. If one is po'ing something they most probably only care about the description - We will not omit the summary
Modified:
lldb/trunk/include/lldb/Core/ValueObject.h
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
Modified: lldb/trunk/include/lldb/Core/ValueObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObject.h?rev=153608&r1=153607&r2=153608&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObject.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObject.h Wed Mar 28 17:17:37 2012
@@ -309,6 +309,16 @@
m_use_objc = use;
return *this;
}
+
+ DumpValueObjectOptions&
+ SetShowSummary(bool show = true)
+ {
+ if (show == false)
+ SetOmitSummaryDepth(UINT32_MAX);
+ else
+ SetOmitSummaryDepth(0);
+ return *this;
+ }
DumpValueObjectOptions&
SetUseDynamicType(lldb::DynamicValueType dyn = lldb::eNoDynamicValues)
Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=153608&r1=153607&r2=153608&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Wed Mar 28 17:17:37 2012
@@ -364,10 +364,11 @@
.SetScopeChecked(true)
.SetFlatOutput(false)
.SetUseSyntheticValue(true)
- .SetOmitSummaryDepth(0)
.SetIgnoreCap(false)
.SetFormat(format)
- .SetSummary();
+ .SetSummary()
+ .SetShowSummary(!m_command_options.print_object);
+
ValueObject::DumpValueObject (*(output_stream),
result_valobj_sp.get(), // Variable object to dump
options);
Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py?rev=153608&r1=153607&r2=153608&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py Wed Mar 28 17:17:37 2012
@@ -358,6 +358,12 @@
self.expect('expr -d true -- @"Hello"',
substrs = ['Hello'])
+ self.expect('expr -d true -o -- @"Hello"',
+ substrs = ['Hello'])
+ self.expect('expr -d true -o -- @"Hello"', matching=False,
+ substrs = ['@"Hello" Hello'])
+
+
def cf_data_formatter_commands(self):
"""Test formatters for Core OSX frameworks."""
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
More information about the lldb-commits
mailing list