- Notifications
You must be signed in to change notification settings - Fork14.5k
[lldb] [cosmetic] Update help message of(lldb) b
#149114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@llvm/pr-subscribers-lldb Author: None (royitaqi) Changes
However, the help message doesn't mention the first use case. This patch adds help message to mention it by adding "List all breakpoints, or ...". Without patch:
With patch:
Full diff:https://github.com/llvm/llvm-project/pull/149114.diff 1 Files Affected:
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cppindex 00c3472444d2e..2d8ab7bf3bbf4 100644--- a/lldb/source/Interpreter/CommandInterpreter.cpp+++ b/lldb/source/Interpreter/CommandInterpreter.cpp@@ -616,7 +616,8 @@ void CommandInterpreter::LoadCommandDictionary() { std::unique_ptr<CommandObjectRegexCommand> break_regex_cmd_up( new CommandObjectRegexCommand( *this, "_regexp-break",- "Set a breakpoint using one of several shorthand formats.",+ "List all breakpoints, or set a breakpoint using one of several "+ "shorthand formats.", "\n" "_regexp-break <filename>:<linenum>:<colnum>\n" " main.c:12:21 // Break at line 12 and column " |
(lldb) b
(lldb) b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM with one suggestion.
Uh oh!
There was an error while loading.Please reload this page.
[begin bikeshedding]
My reasoning is that it describes the more common use case first while also telling you how to get the behavior for listing breakpoints. [end bikeshedding] |
Folks, how about now? (see PR description for latest visualization) -- FWIW,@JDevlieghere: That wasn't bikeshedding at all. The orderis important because it decides what gets delivered to the user/reader. Thanks for the great suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM!
86c63e6
intollvm:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
(lldb) b
can be used in two different ways:b
without arguments, it lists all existing breakpoints.b
with arguments, it adds breakpoints.However, the help message doesn't mention the first use case. This patch adds help message to mention it.
Without patch:
With patch: