Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
royitaqi merged 2 commits intollvm:mainfromroyitaqi:improve-help-message-for-b
Jul 16, 2025

Conversation

royitaqi
Copy link
Contributor

@royitaqiroyitaqi commentedJul 16, 2025
edited
Loading

(lldb) b can be used in two different ways:

  1. Runningb without arguments, it lists all existing breakpoints.
  2. Runningb 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 bSet 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 bSet a breakpoint using one of several shorthand formats, or list theexisting 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

@llvmbot
Copy link
Member

@llvm/pr-subscribers-lldb

Author: None (royitaqi)

Changes

(lldb) b can be used in two different ways:

  1. Runningb without arguments, it lists all existing breakpoints.
  2. Runningb 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 bSet a breakpoint using one of several shorthand formats.  Expects 'raw' input (see 'help raw-input'.)Syntax:_regexp-break &lt;filename&gt;:&lt;linenum&gt;:&lt;colnum&gt;              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 bList all breakpoints, or set a breakpoint using one of several shorthand formats.  Expects 'raw' input (see 'help raw-input'.)Syntax:_regexp-break &lt;filename&gt;:&lt;linenum&gt;:&lt;colnum&gt;              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.

Full diff:https://github.com/llvm/llvm-project/pull/149114.diff

1 Files Affected:

  • (modified) lldb/source/Interpreter/CommandInterpreter.cpp (+2-1)
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 "

@royitaqiroyitaqi changed the title[lldb] Update help message of(lldb) b[lldb] [cosmetic] Update help message of(lldb) bJul 16, 2025
Copy link
Contributor

@dmpotsdmpots left a 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.

@JDevlieghere
Copy link
Member

[begin bikeshedding]
How about something like this:

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'.)

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]

royitaqi reacted with thumbs up emoji

@royitaqi
Copy link
ContributorAuthor

Folks, how about now? (see PR description for latest visualization)
cc@JDevlieghere,@dmpots,@clayborg.

--

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.

dmpots reacted with thumbs up emojiJDevlieghere reacted with heart emoji

Copy link
Member

@JDevlieghereJDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM!

@royitaqiroyitaqi merged commit86c63e6 intollvm:mainJul 16, 2025
9 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dmpotsdmpotsdmpots approved these changes

@JDevlieghereJDevlieghereJDevlieghere approved these changes

@aperezaperezAwaiting requested review from aperez

@clayborgclayborgAwaiting requested review from clayborg

@jiminghamjiminghamAwaiting requested review from jimingham

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@royitaqi@llvmbot@JDevlieghere@dmpots

[8]ページ先頭

©2009-2025 Movatter.jp