diff options
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r-- | lldb/source/Commands/CommandObjectExpression.cpp | 29 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectFrame.cpp | 29 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectMemory.cpp | 28 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 10 |
4 files changed, 47 insertions, 49 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 262d0b58dcf..b8c3c92f438 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -354,22 +354,23 @@ CommandObjectExpression::EvaluateExpression if (format != eFormatDefault) result_valobj_sp->SetFormat (format); + ValueObject::DumpValueObjectOptions options; + options.SetMaximumPointerDepth(0) + .SetMaximumDepth(UINT32_MAX) + .SetShowLocation(false) + .SetShowTypes(m_command_options.show_types) + .SetUseObjectiveC(m_command_options.print_object) + .SetUseDynamicType(use_dynamic) + .SetScopeChecked(true) + .SetFlatOutput(false) + .SetUseSyntheticValue(lldb::eUseSyntheticFilter) + .SetOmitSummaryDepth(0) + .SetIgnoreCap(false) + .SetFormat(format) + .SetSummary(); ValueObject::DumpValueObject (*(output_stream), result_valobj_sp.get(), // Variable object to dump - result_valobj_sp->GetName().GetCString(),// Root object name - 0, // Pointer depth to traverse (zero means stop at pointers) - 0, // Current depth, this is the top most, so zero... - UINT32_MAX, // Max depth to go when dumping concrete types, dump everything... - m_command_options.show_types, // Show types when dumping? - false, // Show locations of variables, no since this is a host address which we don't care to see - m_command_options.print_object, // Print the objective C object? - use_dynamic, - true, // Use synthetic children if available - true, // Scope is already checked. Const results are always in scope. - false, // Don't flatten output - 0, // Always use summaries (you might want an option --no-summary like there is for frame variable) - false, // Do not show more children than settings allow - format); // Format override + options); if (result) result->SetStatus (eReturnStatusSuccessFinishResult); } diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index 409cb6dd136..a57a835de87 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -408,7 +408,7 @@ public: ValueObject::DumpValueObjectOptions options; - options.SetPointerDepth(m_varobj_options.ptr_depth) + options.SetMaximumPointerDepth(m_varobj_options.ptr_depth) .SetMaximumDepth(m_varobj_options.max_depth) .SetShowTypes(m_varobj_options.show_types) .SetShowLocation(m_varobj_options.show_location) @@ -417,7 +417,8 @@ public: .SetUseSyntheticValue((lldb::SyntheticValueType)m_varobj_options.use_synth) .SetFlatOutput(m_varobj_options.flat_output) .SetOmitSummaryDepth(m_varobj_options.no_summary_depth) - .SetIgnoreCap(m_varobj_options.ignore_cap); + .SetIgnoreCap(m_varobj_options.ignore_cap) + .SetSummary(summary_format_sp); if (m_varobj_options.be_raw) options.SetRawDisplay(true); @@ -425,6 +426,7 @@ public: if (variable_list) { const Format format = m_option_format.GetFormat(); + options.SetFormat(format); if (command.GetArgumentCount() > 0) { @@ -466,12 +468,9 @@ public: if (var_sp->DumpDeclaration(&s, show_fullpaths, show_module)) s.PutCString (": "); } - if (summary_format_sp) - valobj_sp->SetCustomSummaryFormat(summary_format_sp); ValueObject::DumpValueObject (result.GetOutputStream(), valobj_sp.get(), - options, - format); + options); } } } @@ -509,15 +508,14 @@ public: var_sp->GetDeclaration ().DumpStopContext (&s, false); s.PutCString (": "); } - if (summary_format_sp) - valobj_sp->SetCustomSummaryFormat(summary_format_sp); + + options.SetFormat(format); Stream &output_stream = result.GetOutputStream(); + options.SetRootValueObjectName(valobj_sp->GetParent() ? name_cstr : NULL); ValueObject::DumpValueObject (output_stream, valobj_sp.get(), - valobj_sp->GetParent() ? name_cstr : NULL, - options, - format); + options); } else { @@ -590,13 +588,12 @@ public: var_sp->GetDeclaration ().DumpStopContext (&s, false); s.PutCString (": "); } - if (summary_format_sp) - valobj_sp->SetCustomSummaryFormat(summary_format_sp); + + options.SetFormat(format); + options.SetRootValueObjectName(name_cstr); ValueObject::DumpValueObject (result.GetOutputStream(), valobj_sp.get(), - name_cstr, - options, - format); + options); } } } diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index 402809443a8..87c0d198716 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -691,22 +691,22 @@ public: bool scope_already_checked = true; + ValueObject::DumpValueObjectOptions options; + options.SetMaximumPointerDepth(m_varobj_options.ptr_depth) + .SetMaximumDepth(m_varobj_options.max_depth) + .SetShowLocation(m_varobj_options.show_location) + .SetShowTypes(m_varobj_options.show_types) + .SetUseObjectiveC(m_varobj_options.use_objc) + .SetScopeChecked(scope_already_checked) + .SetFlatOutput(m_varobj_options.flat_output) + .SetUseSyntheticValue(m_varobj_options.be_raw ? lldb::eNoSyntheticFilter : (m_varobj_options.use_synth ? lldb::eUseSyntheticFilter : lldb::eNoSyntheticFilter) ) + .SetOmitSummaryDepth(m_varobj_options.be_raw ? UINT32_MAX : m_varobj_options.no_summary_depth) + .SetIgnoreCap(m_varobj_options.be_raw ? true : m_varobj_options.ignore_cap) + .SetFormat(format) + .SetSummary(); ValueObject::DumpValueObject (*output_stream, valobj_sp.get(), - NULL, - m_varobj_options.ptr_depth, - 0, - m_varobj_options.max_depth, - m_varobj_options.show_types, - m_varobj_options.show_location, - m_varobj_options.use_objc, - m_varobj_options.use_dynamic, - m_varobj_options.be_raw ? false : m_varobj_options.use_synth, - scope_already_checked, - m_varobj_options.flat_output, - m_varobj_options.be_raw ? UINT32_MAX : m_varobj_options.no_summary_depth, - m_varobj_options.be_raw ? true : m_varobj_options.ignore_cap, - format); + options); } else { diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index e396a8b27e3..1b74e08c0ca 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -594,7 +594,7 @@ public: { ValueObject::DumpValueObjectOptions options; - options.SetPointerDepth(m_varobj_options.ptr_depth) + options.SetMaximumPointerDepth(m_varobj_options.ptr_depth) .SetMaximumDepth(m_varobj_options.max_depth) .SetShowTypes(m_varobj_options.show_types) .SetShowLocation(m_varobj_options.show_location) @@ -641,13 +641,13 @@ public: const Format format = m_option_format.GetFormat(); if (format != eFormatDefault) - valobj_sp->SetFormat (format); + options.SetFormat(format); + + options.SetRootValueObjectName(root_name); ValueObject::DumpValueObject (s, valobj_sp.get(), - root_name, - options, - format); + options); } |