diff options
author | emaste <emaste@FreeBSD.org> | 2013-11-06 16:48:53 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2013-11-06 16:48:53 +0000 |
commit | c727fe695d28799acb499e9961f11ec07d4f9fe2 (patch) | |
tree | 56d79f94966870db1cecd65a7264510a25fd1cba /source/Core/Debugger.cpp | |
parent | 2e8c9206a971efee1b77ad2ae852265d6f4ecaa0 (diff) | |
download | FreeBSD-src-c727fe695d28799acb499e9961f11ec07d4f9fe2.zip FreeBSD-src-c727fe695d28799acb499e9961f11ec07d4f9fe2.tar.gz |
Import lldb as of SVN r194122
Sponsored by: DARPA, AFRL
Diffstat (limited to 'source/Core/Debugger.cpp')
-rw-r--r-- | source/Core/Debugger.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/source/Core/Debugger.cpp b/source/Core/Debugger.cpp index d1d2ebb..3941d82 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)) |