aboutsummaryrefslogtreecommitdiff
path: root/source/Core/Debugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Core/Debugger.cpp')
-rw-r--r--source/Core/Debugger.cpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/source/Core/Debugger.cpp b/source/Core/Debugger.cpp
index d1d2ebb0550b..3941d82d47b0 100644
--- a/source/Core/Debugger.cpp
+++ b/source/Core/Debugger.cpp
@@ -132,6 +132,7 @@ g_properties[] =
{ "thread-format", OptionValue::eTypeString , true, 0 , DEFAULT_THREAD_FORMAT, NULL, "The default thread format string to use when displaying thread information." },
{ "use-external-editor", OptionValue::eTypeBoolean, true, false, NULL, NULL, "Whether to use an external editor or not." },
{ "use-color", OptionValue::eTypeBoolean, true, true , NULL, NULL, "Whether to use Ansi color codes or not." },
+{ "auto-one-line-summaries", OptionValue::eTypeBoolean, true, true, NULL, NULL, "If true, LLDB will automatically display small structs in one-liner format (default: true)." },
{ NULL, OptionValue::eTypeInvalid, true, 0 , NULL, NULL, NULL }
};
@@ -151,6 +152,7 @@ enum
ePropertyThreadFormat,
ePropertyUseExternalEditor,
ePropertyUseColor,
+ ePropertyAutoOneLineSummaries
};
//
@@ -347,6 +349,14 @@ Debugger::GetDisassemblyLineCount () const
return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_properties[idx].default_uint_value);
}
+bool
+Debugger::GetAutoOneLineSummaries () const
+{
+ const uint32_t idx = ePropertyAutoOneLineSummaries;
+ return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, true);
+
+}
+
#pragma mark Debugger
//const DebuggerPropertiesSP &
@@ -821,7 +831,6 @@ Debugger::GetSelectedExecutionContext ()
}
}
return exe_ctx;
-
}
InputReaderSP
@@ -1720,7 +1729,6 @@ FormatPromptRecurse
do_deref_pointer = false;
}
- // <rdar://problem/11338654>
// we do not want to use the summary for a bitfield of type T:n
// if we were originally dealing with just a T - that would get
// us into an endless recursion
@@ -1902,12 +1910,12 @@ FormatPromptRecurse
if (var_name_begin[0] == 'n' || var_name_begin[5] == 'f')
{
format_file_spec.GetFilename() = exe_module->GetFileSpec().GetFilename();
- var_success = format_file_spec;
+ var_success = (bool)format_file_spec;
}
else
{
format_file_spec = exe_module->GetFileSpec();
- var_success = format_file_spec;
+ var_success = (bool)format_file_spec;
}
}
}
@@ -1983,7 +1991,7 @@ FormatPromptRecurse
ValueObjectSP return_valobj_sp = StopInfo::GetReturnValueObject (stop_info_sp);
if (return_valobj_sp)
{
- ValueObject::DumpValueObject (s, return_valobj_sp.get());
+ return_valobj_sp->Dump(s);
var_success = true;
}
}
@@ -2067,12 +2075,12 @@ FormatPromptRecurse
if (IsToken (var_name_begin, "basename}"))
{
format_file_spec.GetFilename() = module->GetFileSpec().GetFilename();
- var_success = format_file_spec;
+ var_success = (bool)format_file_spec;
}
else if (IsToken (var_name_begin, "fullpath}"))
{
format_file_spec = module->GetFileSpec();
- var_success = format_file_spec;
+ var_success = (bool)format_file_spec;
}
}
}
@@ -2091,12 +2099,12 @@ FormatPromptRecurse
if (IsToken (var_name_begin, "basename}"))
{
format_file_spec.GetFilename() = sc->comp_unit->GetFilename();
- var_success = format_file_spec;
+ var_success = (bool)format_file_spec;
}
else if (IsToken (var_name_begin, "fullpath}"))
{
format_file_spec = *sc->comp_unit;
- var_success = format_file_spec;
+ var_success = (bool)format_file_spec;
}
}
}
@@ -2355,12 +2363,12 @@ FormatPromptRecurse
if (IsToken (var_name_begin, "basename}"))
{
format_file_spec.GetFilename() = sc->line_entry.file.GetFilename();
- var_success = format_file_spec;
+ var_success = (bool)format_file_spec;
}
else if (IsToken (var_name_begin, "fullpath}"))
{
format_file_spec = sc->line_entry.file;
- var_success = format_file_spec;
+ var_success = (bool)format_file_spec;
}
}
else if (IsTokenWithFormat (var_name_begin, "number", token_format, "%" PRIu64, exe_ctx, sc))