Hi, Recently a feature called "return address signing" has been added to GCC to prevent stack smash stack on AArch64. For details please refer: https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00376.html GDB needs to be aware of this feature so it can restore the original return address which is critical for unwinding. On compiler side, whenever return address, i.e. LR register, is mangled or restored by hardware instruction, compiler is expected to generate a DW_CFA_GNU_window_save CFA instruction to toggle the LR signing status. DW_CFA_GNU_window_save was introduced by SPARC for their register window feature, here AArch64 want to multiplex this DWARF CFA instruction as it's in vendor space. So, a new gdbarch method, dwarf_cfa_op, is introduced. Currently, I have restricted it's parameter to those only needed by SPARC and AArch64 for DW_CFA_GNU_window_save which is a instruction takes none operand. Should any further DWARF CFA instructions want to be multiplexed in the future, the parameter list can be extended. Below is the current function prototype. typedef int (gdbarch_dwarf_multiplex_cfa_op_ftype) (struct gdbarch *gdbarch, gdb_byte op, struct dwarf2_frame_state *fs); DW_CFA_GNU_window_save support for SPARC is migrated to this new gdbarch method. SPARC-linux cross gdb build OK. OK for master? gdb/ 2017-04-19 Jiong Wang * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the visibility external. (execute_cfa_program): Multiplex DW_CFA_GNU_window_save. (enum cfa_how_kind): Move to ... (struct dwarf2_frame_state_reg_info): Likewise. (struct dwarf2_frame_state): Likewise. * dwarf2-frame.h: ... here. (dwarf2_frame_state_alloc_regs): New declaration. * gdbarch.sh: New target hook dwarf_cfa_op. * gdbarch.c: Regenerated. * gdbarch.h: Regenerated. * sparc-tdep.c (sparc_dwarf_cfa_op): New function. (sparc32_gdbarch_init): Register dwarf_cfa_op hook.