diff options
author | 2012-08-29 19:17:19 +0000 | |
---|---|---|
committer | 2012-08-29 19:17:19 +0000 | |
commit | 4ffb5c22ebad398ed096c682322b687652d7bad2 (patch) | |
tree | e4ab84770ccc1fa0925f42acd273780849a51eca | |
parent | Adjust for changes to "struct reg". (diff) | |
download | wireguard-openbsd-4ffb5c22ebad398ed096c682322b687652d7bad2.tar.xz wireguard-openbsd-4ffb5c22ebad398ed096c682322b687652d7bad2.zip |
Add DWARF2 CFI unwinder for hppa.
-rw-r--r-- | gnu/usr.bin/binutils/gdb/hppa-tdep.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/gdb/hppa-tdep.c b/gnu/usr.bin/binutils/gdb/hppa-tdep.c index a1da98d37e3..27dde7b731c 100644 --- a/gnu/usr.bin/binutils/gdb/hppa-tdep.c +++ b/gnu/usr.bin/binutils/gdb/hppa-tdep.c @@ -35,6 +35,7 @@ /* For argument passing to the inferior */ #include "symtab.h" #include "dis-asm.h" +#include "dwarf2-frame.h" #include "trad-frame.h" #include "frame-unwind.h" #include "frame-base.h" @@ -2395,6 +2396,16 @@ hppa_frame_prev_register_helper (struct frame_info *next_frame, trad_frame_get_prev_register (next_frame, saved_regs, regnum, optimizedp, lvalp, addrp, realnump, valuep); } + +static void +hppa_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, + struct dwarf2_frame_state_reg *reg) +{ + if (regnum == HPPA_PCOQ_HEAD_REGNUM) + reg->how = DWARF2_FRAME_REG_RA; + else if (regnum == HPPA_SP_REGNUM) + reg->how = DWARF2_FRAME_REG_CFA; +} /* Here is a table of C type sizes on hppa with various compiles @@ -2559,6 +2570,10 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Hook in ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); + /* Hook in the DWARF CFI frame unwinder. */ + dwarf2_frame_set_init_reg (gdbarch, hppa_dwarf2_frame_init_reg); + frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer); + /* Hook in the default unwinders. */ frame_unwind_append_sniffer (gdbarch, hppa_stub_unwind_sniffer); frame_unwind_append_sniffer (gdbarch, hppa_frame_unwind_sniffer); |