Skip to content

Commit 86c63e6

Browse files
authored
[lldb] [cosmetic] Update help message of (lldb) b (llvm#149114)
`(lldb) b` can be used in two different ways: 1. Running `b` without arguments, it lists all existing breakpoints. 2. Running `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**: ``` (lldb) help b Set a breakpoint using one of several shorthand formats. Expects 'raw' input (see 'help raw-input'.) Syntax: _regexp-break <filename>:<linenum>:<colnum> main.c:12:21 // Break at line 12 and column 21 of main.c ... ``` **With patch**: ``` (lldb) help b Set a breakpoint using one of several shorthand formats, or list the existing breakpoints if no arguments are provided. Expects 'raw' input (see 'help raw-input'.) Syntax: _regexp-break <filename>:<linenum>:<colnum> main.c:12:21 // Break at line 12 and column 21 of main.c ... _regexp-break // List the existing breakpoints ```
1 parent 7e0fde0 commit 86c63e6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lldb/source/Interpreter/CommandInterpreter.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,8 @@ void CommandInterpreter::LoadCommandDictionary() {
616616
std::unique_ptr<CommandObjectRegexCommand> break_regex_cmd_up(
617617
new CommandObjectRegexCommand(
618618
*this, "_regexp-break",
619-
"Set a breakpoint using one of several shorthand formats.",
619+
"Set a breakpoint using one of several shorthand formats, or list "
620+
"the existing breakpoints if no arguments are provided.",
620621
"\n"
621622
"_regexp-break <filename>:<linenum>:<colnum>\n"
622623
" main.c:12:21 // Break at line 12 and column "
@@ -643,7 +644,10 @@ void CommandInterpreter::LoadCommandDictionary() {
643644
" /break here/ // Break on source lines in "
644645
"current file\n"
645646
" // containing text 'break "
646-
"here'.\n",
647+
"here'.\n"
648+
"_regexp-break\n"
649+
" // List the existing "
650+
"breakpoints\n",
647651
lldb::eSymbolCompletion | lldb::eSourceFileCompletion, false));
648652

649653
if (break_regex_cmd_up) {

0 commit comments

Comments
 (0)