Previously, CFA_remember_state stored only the register locations but ignored the CFA value. This needs also to be remembered and restored for correct behavior. The problem occurs, e.g., on functions with multiple epilogues, where the CFA value after the first epilogue is becomes wrong.
Details
Details
- Reviewers
MaskRay - Group Reviewers
debug-info - Commits
- rG7cf99347d4f4: [DWARF] Store CFA value on DW_CFA_remember_state
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
DWARF v5 says:
The DW_CFA_remember_state instruction takes no operands. The required action is to push the set of rules for every register onto an implicit stack.
I think it should mention that "the current CFA rule" is saved as well.
Filed an issue on https://dwarfstd.org/Issues.php , waiting for a link.
Comment Actions
Thanks! I have no commit access; could you commit this for me (Alexis Engelke <engelke@in.tum.de>)?
Comment Actions
I will wait a bit for further feedback and then push this on your behalf (likely tomorrow) :)