Support referencing stack slots in the DWARF debug info#6960
Conversation
Always emit SysV-style CFI unwind info if we need debug info, and reference it in the debug info using DW_OP_call_frame_cfa.
084fc85 to
d9a3e7f
Compare
alexcrichton
left a comment
There was a problem hiding this comment.
Looks all reasonable to me, thanks again for working on this! I'm no expert myself in debuginfo but I don't think we necessarily have a resident expert to turn to, so happy to review at a somewhat higher level and lean on you for the DWARF correctness and all that.
One final comment I'd have in addition to those below is that our current debuginfo tests are pretty primitive, so if you're interested or so inspired I think it'd be great to soup them up. For example I'd love to have "just" a directory of C and/or Rust files which are compiled automatically in CI and the source itself has various special comments for commands/breakpoints/etc.
|
Oh interesting! So there's no way for the dwarf sections to actually refer to |
I am no great Unix expert myself, so do not know for certain. I suspect that it is indeed possible for the debugger to use FWIW, there are much larger (pun intended) size problems with |
alexcrichton
left a comment
There was a problem hiding this comment.
Ok and no worries, I wanted to confirm for my own curiosity mostly. I think it's reasonable to basically incrementally improve things and any work in this space is very much appreciated!
|
Rustc doesn't ever emit |
…ance#6960) * Add a test * Disable test * Add support for specifying stack locations in debug info Always emit SysV-style CFI unwind info if we need debug info, and reference it in the debug info using DW_OP_call_frame_cfa. * Add toolchain comment to the test * Add a comment and assert
Implements the plan essentially outlined in #2856 (comment):
.debug_frameusingDW_OP_call_frame_cfa.Fixes #3884 (at least to some degree - however, that issue does not contain anything actionable), and also the example I was looking at in C#, though only for
-opt-level 0codegen.