Skip to content

Fix the part of stepping over watchpoints that lldb can fix #6911

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

Merged

Conversation

jimingham
Copy link

There are two bugs with stepping over watchpoint hits in lldb. One is an lldb bug - the ThreadPlanStepOverWatchpoint needs to be registered as a "Controlling Plan" or it won't trigger a public stop when it completes. The other is a kernel issue where if an instruction single step triggers the wp, we only get the single step completion exception, not the watchpoint hit.

But since wp triggering instructions are seldom branch instructions, and lldb runs from branch to branch using breakpoints, with this fix you will only miss the watchpoint hit if you are unlucky enough for the faulting instruction to be the first one in the source line, or the first one in the next source line.

So it's worth having this fix even if we haven't gotten the kernel fix yet.

jimingham and others added 2 commits May 23, 2023 16:12
(cherry picked from commit 2c7abc8)
(cherry picked from commit 090205f)
@jimingham
Copy link
Author

@swift-ci please test

@JDevlieghere JDevlieghere merged commit 7c7884b into swiftlang:swift/release/5.9 May 24, 2023
@jimingham jimingham deleted the partial-step-over-wp branch May 24, 2023 17:04
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.

3 participants