AArch64: DWARF unwinder support for signed return addresses
Pauth address signing is enabled at binary compile time. When enabled the
return addresses for functions may be mangled. This patch adds functionality
to restore the original address for use in the DWARF unwinder.
DW_CFA_AARCH64_negate_ra_state in a binary indicates the toggling of address
signing between enabled and disabled. Ensure the state is stored in the DWARF
register ra_state.
Ensure the pauth DWARF registers are initialised.
gdb/ChangeLog:
* aarch64-tdep.c (aarch64_frame_unmask_address): New function.
(aarch64_dwarf2_prev_register): Unmask PC value.
(aarch64_dwarf2_frame_init_reg): Init pauth registers.
(aarch64_execute_dwarf_cfa_vendor_op): Check for
DW_CFA_AARCH64_negate_ra_state.
(aarch64_gdbarch_init): Add aarch64_execute_dwarf_cfa_vendor_op.