summaryrefslogtreecommitdiff
path: root/source/DataFormatters/ValueObjectPrinter.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
committerEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
commit5e95aa85bb660d45e9905ef1d7180b2678280660 (patch)
tree3c2e41c3be19b7fc7666ed45a5f91ec3b6e35f2a /source/DataFormatters/ValueObjectPrinter.cpp
parent12bd4897ff0678fa663e09d78ebc22dd255ceb86 (diff)
Diffstat (limited to 'source/DataFormatters/ValueObjectPrinter.cpp')
-rw-r--r--source/DataFormatters/ValueObjectPrinter.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/source/DataFormatters/ValueObjectPrinter.cpp b/source/DataFormatters/ValueObjectPrinter.cpp
index 5560ce2971e7..7c794ee2ddac 100644
--- a/source/DataFormatters/ValueObjectPrinter.cpp
+++ b/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)
@@ -631,7 +653,11 @@ ValueObjectPrinter::PrintChildrenIfNeeded (bool value_printed,
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 || !options.m_allow_oneliner_mode) ? false : DataVisualization::ShouldPrintAsOneLiner(*m_valobj);
+ bool print_oneline = (curr_ptr_depth > 0 ||
+ options.m_show_types ||
+ !options.m_allow_oneliner_mode ||
+ options.m_flat_output ||
+ options.m_show_location) ? false : DataVisualization::ShouldPrintAsOneLiner(*m_valobj);
if (print_children)
{