From 958843c32b7a29741f2e45996b5b3e89f9e108b0 Mon Sep 17 00:00:00 2001 From: emaste Date: Wed, 19 Mar 2014 13:11:35 +0000 Subject: MFC r258054: Update LLDB to upstream r194122 snapshot Inludes minor changes relative to upstream, for compatibility with FreeBSD's in-tree LLVM 3.3: - Reverted LLDB r191806, restoring use of previous API. - Reverted part of LLDB r189317, restoring previous enum names. - Work around missing LLVM r192504, using previous registerEHFrames API (limited functionality). - Removed PlatformWindows header include and init/terminate calls. Sponsored by: DARPA, AFRL --- .../lldb/source/Commands/CommandObjectFrame.cpp | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'contrib/llvm/tools/lldb/source/Commands/CommandObjectFrame.cpp') diff --git a/contrib/llvm/tools/lldb/source/Commands/CommandObjectFrame.cpp b/contrib/llvm/tools/lldb/source/Commands/CommandObjectFrame.cpp index aace3a6..0ef9732 100644 --- a/contrib/llvm/tools/lldb/source/Commands/CommandObjectFrame.cpp +++ b/contrib/llvm/tools/lldb/source/Commands/CommandObjectFrame.cpp @@ -25,6 +25,7 @@ #include "lldb/Core/ValueObject.h" #include "lldb/Core/ValueObjectVariable.h" #include "lldb/DataFormatters/DataVisualization.h" +#include "lldb/DataFormatters/ValueObjectPrinter.h" #include "lldb/Host/Host.h" #include "lldb/Interpreter/Args.h" #include "lldb/Interpreter/CommandInterpreter.h" @@ -244,7 +245,14 @@ protected: if (command.GetArgumentCount() == 1) { const char *frame_idx_cstr = command.GetArgumentAtIndex(0); - frame_idx = Args::StringToUInt32 (frame_idx_cstr, UINT32_MAX, 0); + bool success = false; + frame_idx = Args::StringToUInt32 (frame_idx_cstr, UINT32_MAX, 0, &success); + if (!success) + { + result.AppendErrorWithFormat ("invalid frame index argument '%s'", frame_idx_cstr); + result.SetStatus (eReturnStatusFailed); + return false; + } } else if (command.GetArgumentCount() == 0) { @@ -283,7 +291,7 @@ protected: OptionDefinition CommandObjectFrameSelect::CommandOptions::g_option_table[] = { -{ LLDB_OPT_SET_1, false, "relative", 'r', required_argument, NULL, 0, eArgTypeOffset, "A relative frame index offset from the current frame index."}, +{ LLDB_OPT_SET_1, false, "relative", 'r', OptionParser::eRequiredArgument, NULL, 0, eArgTypeOffset, "A relative frame index offset from the current frame index."}, { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } }; @@ -400,7 +408,7 @@ protected: else if (!m_option_variable.summary_string.IsCurrentValueEmpty()) summary_format_sp.reset(new StringSummaryFormat(TypeSummaryImpl::Flags(),m_option_variable.summary_string.GetCurrentValue())); - ValueObject::DumpValueObjectOptions options(m_varobj_options.GetAsDumpOptions(false,eFormatDefault,summary_format_sp)); + DumpValueObjectOptions options(m_varobj_options.GetAsDumpOptions(eLanguageRuntimeDescriptionDisplayVerbosityFull,eFormatDefault,summary_format_sp)); if (variable_list) { @@ -447,9 +455,7 @@ protected: if (var_sp->DumpDeclaration(&s, show_fullpaths, show_module)) s.PutCString (": "); } - ValueObject::DumpValueObject (result.GetOutputStream(), - valobj_sp.get(), - options); + valobj_sp->Dump(result.GetOutputStream(),options); } } } @@ -493,9 +499,7 @@ protected: Stream &output_stream = result.GetOutputStream(); options.SetRootValueObjectName(valobj_sp->GetParent() ? name_cstr : NULL); - ValueObject::DumpValueObject (output_stream, - valobj_sp.get(), - options); + valobj_sp->Dump(output_stream,options); } else { @@ -571,9 +575,7 @@ protected: options.SetFormat(format); options.SetRootValueObjectName(name_cstr); - ValueObject::DumpValueObject (result.GetOutputStream(), - valobj_sp.get(), - options); + valobj_sp->Dump(result.GetOutputStream(),options); } } } -- cgit v1.1