diff options
author | Enrico Granata <egranata@apple.com> | 2015-06-03 20:43:54 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2015-06-03 20:43:54 +0000 |
commit | d5957336178074b29ad5105ad76611e5187b636d (patch) | |
tree | 69888cd8e345e168c9c0f1a98c763231dc26cc9a /lldb/source/DataFormatters/ValueObjectPrinter.cpp | |
parent | 4bcc13d98812d97a9e8e75c494b73587d64ee044 (diff) | |
download | bcm5719-llvm-d5957336178074b29ad5105ad76611e5187b636d.tar.gz bcm5719-llvm-d5957336178074b29ad5105ad76611e5187b636d.zip |
Fix a bug where trying to Dump() a ValueObject would use the static/non-synthetic version of the value even if the ValueObject one actually called Dump() on turned out to be dynamic and/or synthetic
This was of course overridable by using DumpValueObjectOptions, but the default should be saner and the previous behavior made for a few fun investigations....
rdar://problem/21065149
llvm-svn: 238961
Diffstat (limited to 'lldb/source/DataFormatters/ValueObjectPrinter.cpp')
-rw-r--r-- | lldb/source/DataFormatters/ValueObjectPrinter.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/lldb/source/DataFormatters/ValueObjectPrinter.cpp index 8fd627020bc..7c794ee2dda 100644 --- a/lldb/source/DataFormatters/ValueObjectPrinter.cpp +++ b/lldb/source/DataFormatters/ValueObjectPrinter.cpp @@ -21,6 +21,28 @@ using namespace lldb; using namespace lldb_private; +DumpValueObjectOptions::DumpValueObjectOptions (ValueObject& valobj) : +DumpValueObjectOptions() +{ + m_use_dynamic = valobj.GetDynamicValueType(); + m_use_synthetic = valobj.IsSynthetic(); +} + +ValueObjectPrinter::ValueObjectPrinter (ValueObject* valobj, + Stream* s) +{ + if (valobj) + { + DumpValueObjectOptions options(*valobj); + Init (valobj,s,options,options.m_max_ptr_depth,0); + } + else + { + DumpValueObjectOptions options; + Init (valobj,s,options,options.m_max_ptr_depth,0); + } +} + ValueObjectPrinter::ValueObjectPrinter (ValueObject* valobj, Stream* s, const DumpValueObjectOptions& options) |