[lldb] Define breakpoint location "." to mean the location(s) at which the current thread is stopped (#194272)#12855
Open
kastiglione wants to merge 1 commit intostable/21.xfrom
Conversation
…h the current thread is stopped (llvm#194272) Adds `.` as a new `breakpt-id` syntax. Users can specify `.` to mean the breakpoint location(s) that caused the current thread to stop. I selected `.` to mean the current breakpoint locations for two reasons. In a shells, period means <ins>current</ins> directory. In prose, a period is a <ins>stop</ins>. My workflow often starts with multiple breakpoint locations, such as with regex breakpoints, or basename breakpoints for overloaded/overridden names. As locations are hit, I realize which locations are no longer needed. This new syntax makes it quick and easy to disable the currently stopped location(s). Another use case for this is to quickly repeat commands for the current location: ``` break com add -o 'p someVar' . ``` Usage example: ``` (lldb) b main.c:2 Process 47071 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: ... main`main at main.c:2:3 1 int main() { -> 2 return 0; 3 } Target 0: (main) stopped. (lldb) breakpoint disable . 1 breakpoints disabled. (lldb) breakpoint list Current breakpoints: 1: file = 'main.c', line = 2, exact_match = 0, locations = 1 1.1: where = main`main + 12 at main.c:2:3, address = ..., hit count = 1 Options: disabled ``` rdar://73047170 Assisted-by: claude (cherry picked from commit 749af7f)
Author
|
@swift-ci test |
Author
|
@swift-ci test windows |
Author
|
@swift-ci test macOS |
Author
|
@swift-ci test windows |
Author
|
@swift-ci test macOS |
Author
|
@swift-ci test windows |
Author
|
@swift-ci test macOS |
6 similar comments
Author
|
@swift-ci test macOS |
Author
|
@swift-ci test macOS |
Author
|
@swift-ci test macOS |
Author
|
@swift-ci test macOS |
Author
|
@swift-ci test macOS |
Author
|
@swift-ci test macOS |
Author
|
@swift-ci test windows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
.as a newbreakpt-idsyntax. Users can specify.to mean the breakpointlocation(s) that caused the current thread to stop.
I selected
.to mean the current breakpoint locations for two reasons. In a shells,period means current directory. In prose, a period is a stop.
My workflow often starts with multiple breakpoint locations, such as with regex
breakpoints, or basename breakpoints for overloaded/overridden names. As locations are
hit, I realize which locations are no longer needed. This new syntax makes it quick and
easy to disable the currently stopped location(s).
Another use case for this is to quickly repeat commands for the current location:
break com add -o 'p someVar' .Usage example:
rdar://73047170
Assisted-by: claude
(cherry picked from commit 749af7f)