forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 341
[lldb][swift] Improve async stepping with arm64e #10671
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
adrian-prantl
merged 4 commits into
swiftlang:swift/release/6.2
from
felipepiovezan:felipe/arm64e_unwind_heuristic
May 14, 2025
Merged
[lldb][swift] Improve async stepping with arm64e #10671
adrian-prantl
merged 4 commits into
swiftlang:swift/release/6.2
from
felipepiovezan:felipe/arm64e_unwind_heuristic
May 14, 2025
Conversation
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
@swift-ci test |
With arm64e, many more branches are generated, which cause the debugger to stop more often while stepping. Among those stops are code regions where the debugger gets confused about what is stored in the async register stack slot. This commit revives a heuristic that was previously used by default for all architectures and that works in all PC addresses, but that sacrifices unwinding o recursive functions. It is only used if the target is arm64e.
…geRuntime This is required so that the breakpoint may be resolved correctly in case the address has been signed.
f93e511
to
be2f5ca
Compare
@swift-ci test |
The code comparing async context addresses need to strip any pointer authentication bits, otherwise the integer comparison will always fail.
be2f5ca
to
6e361c7
Compare
felipepiovezan
commented
May 13, 2025
@@ -76,25 +76,27 @@ struct MockStackID : StackID { | |||
}; | |||
|
|||
TEST_F(StackIDTest, StackStackCFAComparison) { | |||
auto process = MockProcess(m_target_sp, Listener::MakeListener("dummy")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you're puzzled by this change: FixDataAddress
indirectly calls "shared_from_this" on the process class, so it can't be stack allocated.
@swift-ci test |
adrian-prantl
approved these changes
May 14, 2025
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.
(review each commit in isolation)
This PR improves arm64e swift async stepping by: