aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppabsd-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2013-07-25 12:05:01 +0000
committerMark Kettenis <kettenis@gnu.org>2013-07-25 12:05:01 +0000
commit177679881eb0cbd3201de519c95118326f411bba (patch)
treefb4f9a8a9b53b84628b5833b79b397a50ee78512 /gdb/hppabsd-tdep.c
parentfdc8aae84831d0ae839672f4ee47e53f295a7869 (diff)
downloadgdb-177679881eb0cbd3201de519c95118326f411bba.zip
gdb-177679881eb0cbd3201de519c95118326f411bba.tar.gz
gdb-177679881eb0cbd3201de519c95118326f411bba.tar.bz2
2013-07-25 Mark Kettenis <kettenis@gnu.org>
* hppabsd-tdep.c: Include "dwarf2-frame.h". (hppabsd_dwarf2_frame_init_reg): New function. (hppabsd_init_abi): Hook in the DWARF CFI frame unwinder.
Diffstat (limited to 'gdb/hppabsd-tdep.c')
-rw-r--r--gdb/hppabsd-tdep.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/hppabsd-tdep.c b/gdb/hppabsd-tdep.c
index 4cfb101..9b2a219 100644
--- a/gdb/hppabsd-tdep.c
+++ b/gdb/hppabsd-tdep.c
@@ -26,6 +26,7 @@
#include "hppa-tdep.h"
#include "hppabsd-tdep.h"
+#include "dwarf2-frame.h"
#include "solib-svr4.h"
static CORE_ADDR
@@ -104,6 +105,17 @@ hppabsd_find_global_pointer (struct gdbarch *gdbarch, struct value *function)
}
+static void
+hppabsd_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
+ struct dwarf2_frame_state_reg *reg,
+ struct frame_info *this_frame)
+{
+ if (regnum == HPPA_PCOQ_HEAD_REGNUM)
+ reg->how = DWARF2_FRAME_REG_RA;
+ else if (regnum == HPPA_SP_REGNUM)
+ reg->how = DWARF2_FRAME_REG_CFA;
+}
+
void
hppabsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -122,4 +134,8 @@ hppabsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* OpenBSD and NetBSD use SVR4-style shared libraries. */
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
+
+ /* Hook in the DWARF CFI frame unwinder. */
+ dwarf2_frame_set_init_reg (gdbarch, hppabsd_dwarf2_frame_init_reg);
+ dwarf2_append_unwinders (gdbarch);
}