summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 2e852d0bb76..0ef97326150 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -245,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)
{
OpenPOWER on IntegriCloud