diff options
author | royitaqi <royitaqi@users.noreply.github.com> | 2025-07-16 16:32:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-16 16:32:40 -0700 |
commit | 86c63e6bd66f9db9c7320155da7a2042407b5a1a (patch) | |
tree | 46168a90e4d43780b2358c77c20a397638902893 /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 7e0fde0c2f6b0b9d727ce9196956b36e91961ac4 (diff) | |
download | llvm-86c63e6bd66f9db9c7320155da7a2042407b5a1a.zip llvm-86c63e6bd66f9db9c7320155da7a2042407b5a1a.tar.gz llvm-86c63e6bd66f9db9c7320155da7a2042407b5a1a.tar.bz2 |
[lldb] [cosmetic] Update help message of `(lldb) b` (#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
```
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 00c3472..da545f1 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.", + "Set a breakpoint using one of several shorthand formats, or list " + "the existing breakpoints if no arguments are provided.", "\n" "_regexp-break <filename>:<linenum>:<colnum>\n" " main.c:12:21 // Break at line 12 and column " @@ -643,7 +644,10 @@ void CommandInterpreter::LoadCommandDictionary() { " /break here/ // Break on source lines in " "current file\n" " // containing text 'break " - "here'.\n", + "here'.\n" + "_regexp-break\n" + " // List the existing " + "breakpoints\n", lldb::eSymbolCompletion | lldb::eSourceFileCompletion, false)); if (break_regex_cmd_up) { |