-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Don't eliminate frame pointers on thumb targets #69248
Conversation
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
LGTM (modulo nit), but I'm not 100% sure about signing off such a change to a target (family) that I don't really use or know. Can we get a second opinion from someone versed in the targets this affects? I suppose I could also rubber-stamp and we'll see if anyone complains about their program becoming more bloated. |
As it stands, this will only apply to the microcontroller targets, not the other thumb targets (which are
I mentioned the this fix to @japaric at work, who I believe added these targets originally, so perhaps I can r? @japaric |
I checked the output machine code of
AFAICT, LLD does not produce a final artifact with these changes. If you change the linker to GNU LD then you get an artifact. I haven't tried the GNU LD output on hardware though; I'll try that later today. |
Scratch that. I had a |
Just to make sure, I built and ran the test case with noth lld & GNU ld and both produced debuggable binaries with the correct backstrace. |
Nice! |
I can also confirm that, with these changes (and The missing artifact issue that @jonas-schievink and I observed was just a few bugs in other tools (e.g. This looks good to me and fixes a huge pain point for people that are using backtraces in GDB. Thanks @jonas-schievink and @MabezDev (who I believe first found out about the frame-pointer option in rustc / llvm) for working on this! @bors r+ |
📌 Commit 27cfb2b has been approved by |
Don't eliminate frame pointers on thumb targets This should hopefully fix issues rust-lang#69231 and rust-embedded/cortex-m-rt#139. ~~I couldn't test this locally as the rustc I produced does not create binaries (no idea why).~~ Resolved.
Rollup of 5 pull requests Successful merges: - #68863 (ci: switch macOS builders to 10.15) - #69142 (Add shared script for linkchecking books.) - #69248 (Don't eliminate frame pointers on thumb targets) - #69280 (Remove special case for `simd_shuffle` arg promotion) - #69284 (Reword OpenOptions::{create, create_new} doc.) Failed merges: r? @ghost
This should hopefully fix issues #69231 and rust-embedded/cortex-m-rt#139.
I couldn't test this locally as the rustc I produced does not create binaries (no idea why).Resolved.