Skip to content

[cherry-pick][lldb] Override Should{Select,Show} in StopReasonBreakpoint (#135637) #10490

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

felipepiovezan
Copy link

This is necessary so that LLDB does not select (or show the stop reason for) a thread which stopped at an internal breakpoint.

Other than manual testing/inspection, which I've done, this does not seem to lend itself to API testing, as we cannot set internal breakpoints through the SBAPI.

(cherry picked from commit 7491ff7)

@felipepiovezan felipepiovezan requested a review from a team as a code owner April 14, 2025 23:24
@felipepiovezan
Copy link
Author

@swift-ci test

…4160)

This NFC patch simplifies the main loop in HandleProcessStateChanged
event by moving duplicated code into the StopInfo class, also allowing
StopInfo subclasses to override behavior.

More specifically, two functions are created:

* ShouldShow: should a Thread with such StopInfo should be printed when
the debugger stops? Currently, no StopInfo subclasses override this, but
a subsequent patch will fix a bug by making StopInfoBreakpoint check
whether the breakpoint is internal.

* ShouldSelect: should a Thread with such a StopInfo be selected? This
is currently overridden by StopInfoUnixSignal but will, in the future,
be overridden by StopInfoBreakpoint.

(cherry-picked from commit c14b6e9)
)

This is necessary so that LLDB does not select (or show the stop reason
for) a thread which stopped at an internal breakpoint.

Other than manual testing/inspection, which I've done, this does not
seem to lend itself to API testing, as we cannot set internal
breakpoints through the SBAPI.

(cherry picked from commit 7491ff7)
@felipepiovezan felipepiovezan force-pushed the felipe/override_should_show_should_select_62 branch from d595d91 to cc12b57 Compare April 15, 2025 14:25
@felipepiovezan
Copy link
Author

@swift-ci test

@felipepiovezan
Copy link
Author

Added a necessary NFC cherry-pick too

@adrian-prantl adrian-prantl merged commit ce18439 into swiftlang:swift/release/6.2 Apr 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants