aboutsummaryrefslogtreecommitdiff
path: root/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Commands/CommandObjectFrame.cpp')
-rw-r--r--source/Commands/CommandObjectFrame.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/source/Commands/CommandObjectFrame.cpp b/source/Commands/CommandObjectFrame.cpp
index aace3a649602..0ef973261508 100644
--- a/source/Commands/CommandObjectFrame.cpp
+++ b/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);
}
}
}