diff options
author | Jim Ingham <jingham@apple.com> | 2016-11-18 22:06:10 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2016-11-18 22:06:10 +0000 |
commit | 9ac82603d560295112247de8f5e1de09a34822e8 (patch) | |
tree | 059a09706de8f04fafbdf95d4c4bf8a4211d54b0 /lldb/source/Commands/CommandObjectThread.cpp | |
parent | 3a5328ecddf04fbc456f1bbe39db1a3ab2894bdf (diff) | |
download | bcm5719-llvm-9ac82603d560295112247de8f5e1de09a34822e8.tar.gz bcm5719-llvm-9ac82603d560295112247de8f5e1de09a34822e8.zip |
Fix "thread step until" handling of multiple line inputs.
Also document that it handles same, and add some tests.
llvm-svn: 287386
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectThread.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index 97718946395..28c06f38339 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -977,7 +977,9 @@ public: interpreter, "thread until", "Continue until a line number or address is reached by the " "current or specified thread. Stops when returning from " - "the current function as a safety measure.", + "the current function as a safety measure. " + "The target line number(s) are given as arguments, and if more than one" + " is provided, stepping will stop when the first one is hit.", nullptr, eCommandRequiresThread | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched | eCommandProcessMustBePaused), @@ -1025,11 +1027,11 @@ protected: size_t num_args = command.GetArgumentCount(); for (size_t i = 0; i < num_args; i++) { uint32_t line_number; - line_number = StringConvert::ToUInt32(command.GetArgumentAtIndex(0), + line_number = StringConvert::ToUInt32(command.GetArgumentAtIndex(i), UINT32_MAX); if (line_number == UINT32_MAX) { result.AppendErrorWithFormat("invalid line number: '%s'.\n", - command.GetArgumentAtIndex(0)); + command.GetArgumentAtIndex(i)); result.SetStatus(eReturnStatusFailed); return false; } else |