Skip to content

🍒 [lldb] Skip prologue when stepping through swift_task_switch #11181

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

The first commit just factors out a helper function to be reused by the second commit.
We should find a place for that function in an upstream file later.

Plans stepping through a swift_task_switch are often the last sub-plan
for a StepOver action, meaning the plan's destination is also the PC
where users will take control of the program. As such, it is crucial
that these plans skip over the prologue of their destination function,
otherwise most variables won't be in scope.

rdar://149391650

…untime

This will be useful for an upcoming commit. This is also a good
candidate to be placed in a non-swift specific file, if there are uses
for it upstream. This should be revisited.

(cherry picked from commit 283ee15)
Plans stepping through a swift_task_switch are often the last sub-plan
for a StepOver action, meaning the plan's destination is also the PC
where users will take control of the program. As such, it is crucial
that these plans skip over the prologue of their destination function,
otherwise most variables won't be in scope.

Because x86 and arm diverge on the codegen for `}` in a scope, I had to
add a `print` statement in the for loop of the affected test.

(cherry picked from commit 3ed5f1d)
@felipepiovezan felipepiovezan requested a review from a team as a code owner August 15, 2025 18:31
@felipepiovezan
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 26f4db4 into swiftlang:swift/release/6.2.0 Aug 18, 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.

3 participants