summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/DataFormatters')
-rw-r--r--lldb/source/DataFormatters/FormatManager.cpp15
-rw-r--r--lldb/source/DataFormatters/ValueObjectPrinter.cpp5
2 files changed, 15 insertions, 5 deletions
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index 723e6c70cf3..bd4e58c7567 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -541,6 +541,7 @@ FormatManager::ShouldPrintAsOneLiner (ValueObject& valobj)
idx < valobj.GetNumChildren();
idx++)
{
+ bool is_synth_val = false;
ValueObjectSP child_sp(valobj.GetChildAtIndex(idx, true));
// something is wrong here - bail out
if (!child_sp)
@@ -548,7 +549,17 @@ FormatManager::ShouldPrintAsOneLiner (ValueObject& valobj)
// if we decided to define synthetic children for a type, we probably care enough
// to show them, but avoid nesting children in children
if (child_sp->GetSyntheticChildren().get() != nullptr)
- return false;
+ {
+ ValueObjectSP synth_sp(child_sp->GetSyntheticValue());
+ // wait.. wat? just get out of here..
+ if (!synth_sp)
+ return false;
+ // but if we only have them to provide a value, keep going
+ if (synth_sp->MightHaveChildren() == false && synth_sp->DoesProvideSyntheticValue())
+ is_synth_val = true;
+ else
+ return false;
+ }
total_children_name_len += child_sp->GetName().GetLength();
@@ -572,7 +583,7 @@ FormatManager::ShouldPrintAsOneLiner (ValueObject& valobj)
// ...and no summary...
// (if it had a summary and the summary wanted children, we would have bailed out anyway
// so this only makes us bail out if this has no summary and we would then print children)
- if (!child_sp->GetSummaryFormat())
+ if (!child_sp->GetSummaryFormat() && !is_synth_val) // but again only do that if not a synthetic valued child
return false; // then bail out
}
}
diff --git a/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/lldb/source/DataFormatters/ValueObjectPrinter.cpp
index 126ff78c389..e7bebcbeb4f 100644
--- a/lldb/source/DataFormatters/ValueObjectPrinter.cpp
+++ b/lldb/source/DataFormatters/ValueObjectPrinter.cpp
@@ -591,9 +591,8 @@ ValueObjectPrinter::PrintChildrenOneLiner (bool hide_names)
for (uint32_t idx=0; idx<num_children; ++idx)
{
lldb::ValueObjectSP child_sp(synth_m_valobj->GetChildAtIndex(idx, true));
- lldb::ValueObjectSP child_dyn_sp = child_sp.get() ? child_sp->GetDynamicValue(options.m_use_dynamic) : child_sp;
- if (child_dyn_sp)
- child_sp = child_dyn_sp;
+ if (child_sp)
+ child_sp = child_sp->GetQualifiedRepresentationIfAvailable(options.m_use_dynamic, options.m_use_synthetic);
if (child_sp)
{
if (idx)
OpenPOWER on IntegriCloud