[Lldb-commits] [lldb] [lldb] Update help message of `(lldb) b` (PR #149114)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 16 08:15:07 PDT 2025
https://github.com/royitaqi created https://github.com/llvm/llvm-project/pull/149114
`(lldb) b` can be used in two different ways:
1. Running `b` without arguments, it lists all existing breakpoints.
2. Running `b` with additional arguments, it adds breakpoints.
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**:
```
(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
...
(lldb) apropos breakpoint
b -- Set a breakpoint using one of several shorthand formats.
```
**With patch**:
```
(lldb) help b
List all breakpoints, or 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
...
(lldb) apropos breakpoint
b -- List all breakpoints, or set a breakpoint using one of several shorthand formats.
```
>From eccc519b1c465f3f77297e62dc5d1e7109327508 Mon Sep 17 00:00:00 2001
From: Roy Shi <royshi at meta.com>
Date: Wed, 16 Jul 2025 08:10:05 -0700
Subject: [PATCH] [lldb] Update help message of `b`
---
lldb/source/Interpreter/CommandInterpreter.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 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 "
More information about the lldb-commits
mailing list