Skip to content

Revert "[lldb] Allow fetching of RA register when above fault handler(#98566)" #9863

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

jasonmolenda
Copy link

This reverts commit fd42417.

This patch has two problems. First, it is unnecessary, Pavel landed a fix a week or so before mine which solves this problem in bbd54e0 . Second, the fix is incorrect; for a function above a trap handler, where all registers are available, this patch would have lldb fetch the return address register from frame 0. This might be 10 frames up in the stack; the frame 0 return address register is incorrect. The change would have been correct a short bit later than this, but Pavel's fix is executed earlier in the function and none of this is needed.

(cherry picked from commit d29a50f)

…llvm#98566)"

This reverts commit fd42417.

This patch has two problems.  First, it is unnecessary, Pavel landed
a fix a week or so before mine which solves this problem in
bbd54e0 .  Second, the fix is
incorrect; for a function above a trap handler, where all registers
are available, this patch would have lldb fetch the return address
register from frame 0.  This might be 10 frames up in the stack;
the frame 0 return address register is incorrect.  The change would
have been correct a short bit later than this, but Pavel's fix is
executed earlier in the function and none of this is needed.

(cherry picked from commit d29a50f)
@jasonmolenda jasonmolenda requested a review from a team as a code owner January 21, 2025 22:06
@jasonmolenda
Copy link
Author

@swift-ci test

@JDevlieghere
Copy link

@swift-ci test windows
@swift-ci test macOS

@JDevlieghere JDevlieghere merged commit 8370b43 into swiftlang:swift/release/6.1 Jan 22, 2025
3 checks passed
@jasonmolenda jasonmolenda deleted the r143238845-dont-reuse-frame0-lr-on-leafless-frame-that-trapped branch January 22, 2025 16:41
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.

4 participants