This repository was archived by the owner on Jan 24, 2022. It is now read-only.
Fix unwinding through Reset#337
Merged
bors[bot] merged 4 commits intorust-embedded:masterfrom Nov 23, 2021
Merged
Conversation
|
r? @therealprof (rust-highfive has picked a reviewer for you, use r? to override) |
jonathanpallant
suggested changes
Nov 22, 2021
| #endif | ||
|
|
||
| 4: | ||
| .cfi_def_cfa sp, 0 |
Contributor
There was a problem hiding this comment.
This might be worth an explanation, as it's not something you often come across in ARM asm.
Maybe link to https://sourceware.org/binutils/docs/as/CFI-directives.html, or include their note:
.cfi_def_cfadefines a rule for computing CFA as: take address from register and add offset to it.
Contributor
Author
There was a problem hiding this comment.
Added a comment and link
Contributor
|
Can confirm it resolves the upstream issue though: |
jonathanpallant
approved these changes
Nov 23, 2021
Contributor
|
bors r+ |
Contributor
|
🔒 Permission denied Existing reviewers: click here to make jonathanpallant a reviewer |
Contributor
|
Ugh. Wearing the wrong hat. |
thejpster
approved these changes
Nov 23, 2021
Contributor
|
bors r+ |
Contributor
|
^ have switched hats |
Contributor
Merged
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Unwinders may detect the end of the program by seeing
0xFFFFFFFFinlr, which is why code to ensure that it has that value was added in #293. However, thebl mainoverwrites that value with the current program counter. This PR saves the oldlrvalue on the stack, and adds debuginfo entries to allow an external unwinder to restore the value.This fixes knurling-rs/probe-run#277