diff options
author | Adrian McCarthy <amccarth@google.com> | 2015-12-22 16:50:28 +0000 |
---|---|---|
committer | Adrian McCarthy <amccarth@google.com> | 2015-12-22 16:50:28 +0000 |
commit | c2961ab889fb983df13f7953e1535859d7a45116 (patch) | |
tree | 29cf2b648f71b15743849636167268529623185f /lldb/source/Commands/CommandObjectFrame.cpp | |
parent | 1ca9cda583614da418e48f3c0e912fa509a69573 (diff) | |
download | bcm5719-llvm-c2961ab889fb983df13f7953e1535859d7a45116.tar.gz bcm5719-llvm-c2961ab889fb983df13f7953e1535859d7a45116.zip |
Improve error handling for `frame select` command when there are too many arguments.
Bug: https://llvm.org/bugs/show_bug.cgi?id=25847
It now gives a more specific error message and then returns instead of trying to select the wrong frame.
llvm-svn: 256251
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectFrame.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index e8dc33a8140..9477b50a58d 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -262,8 +262,10 @@ protected: } else { - result.AppendError ("invalid arguments.\n"); + result.AppendErrorWithFormat ("too many arguments; expected frame-index, saw '%s'.\n", + command.GetArgumentAtIndex(0)); m_options.GenerateOptionUsage (result.GetErrorStream(), this); + return false; } } |