|
DWARF Standard
|
230103.1 |
Fangrui Song |
Clarify that DW_CFA_remember_state includes the current CFA |
Clarification |
Open |
Fangrui Song |
Section 6.4.2.4, pg 181
p181 6.4.2.4 Row State Instructions describes the required actions for
DW_CFA_remember_state and DW_CFA_restore_state:
DW_CFA_remember_state
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.
DW_CFA_restore_state
The DW_CFA_restore_state instruction takes no operands. The required action
is to pop the set of rules off the implicit stack and place them in the current row.
The description of DW_CFA_remember_state should take the current CFA into
account. Suggested change:
DW_CFA_remember_state
The DW_CFA_remember_state instruction takes no operands. The required
action is to push the set of rules for **the current CFA and** every
register onto an implicit stack.
The description of DW_CFA_restore_state can remain as is as "the set of
rules" clearly includes the current CFA described by DW_CFA_remember_state.
The stack implementations of libunwind src/dwarf/Gparser.c, gcc
libgcc/unwind-dw2.c, and llvm-project libunwind/src/DwarfParser.hpp all
include the current CFA in the implicit stack.
:set noendofline binary