summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObject.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-03-25 19:46:48 +0000
committerEnrico Granata <egranata@apple.com>2013-03-25 19:46:48 +0000
commitc2a58d73ce3aa7a678b9a00b086944c111aea02a (patch)
tree67a1edf2e9051c0eaa07680bee49484b399b6b44 /lldb/source/Core/ValueObject.cpp
parent92bd7c0337b4e63ea823573f3ce92eb6afbb082c (diff)
downloadbcm5719-llvm-c2a58d73ce3aa7a678b9a00b086944c111aea02a.tar.gz
bcm5719-llvm-c2a58d73ce3aa7a678b9a00b086944c111aea02a.zip
<rdar://problem/13365424>
Ensure that option -Y also works for expression as it does for frame variable Also, if the user passes an explicit format specifier when printing a variable, override the summary's decision to hide the value. This is required for scenarios like this to work: (lldb) p/x c (Class) $0 = 0x0000000100adb7f8 NSObject Previously this would say: (lldb) p/x c (Class) $0 = NSObject ignoring the explicit format specifier llvm-svn: 177893
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r--lldb/source/Core/ValueObject.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 4e5e921f287..783fa129163 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -3396,7 +3396,8 @@ DumpValueObject_Impl (Stream &s,
// Make sure we have a value and make sure the summary didn't
// specify that the value should not be printed - and do not print
// the value if this thing is nil
- if (!is_nil && !value_str.empty() && (entry == NULL || entry->DoesPrintValue() || sum_cstr == NULL) && !options.m_hide_value)
+ // (but show the value if the user passes a format explicitly)
+ if (!is_nil && !value_str.empty() && (entry == NULL || (entry->DoesPrintValue() || options.m_format != eFormatDefault) || sum_cstr == NULL) && !options.m_hide_value)
s.Printf(" %s", value_str.c_str());
if (sum_cstr)
OpenPOWER on IntegriCloud