[DWARF] Store CFA value on DW_CFA_remember_state
authorAlexis Engelke <engelke@in.tum.de>
Wed, 4 Jan 2023 21:51:14 +0000 (13:51 -0800)
committerFangrui Song <i@maskray.me>
Wed, 4 Jan 2023 21:51:14 +0000 (13:51 -0800)
commit7cf99347d4f4341b2f8a53eaaed6f0e137b30869
tree7f14f2230b17da349440e89a79a6197d3317b315
parent0676156f8143e2934f9ba0325daf82791e0235a1
[DWARF] Store CFA value on DW_CFA_remember_state

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.

Reviewed By: #debug-info, MaskRay

Differential Revision: https://reviews.llvm.org/D140338
llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp