diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-06-28 17:29:04 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-06-28 17:29:04 +0000 |
commit | 94afd7a6d348a66ea3fb35fdb8234b050ec8c779 (patch) | |
tree | dbf3f5264799c070696da08515f2d6260ce9df42 /gdb/vaxobsd-tdep.c | |
parent | e111d6c9206464acdff70102b29d82b4b48d1fc1 (diff) | |
download | gdb-94afd7a6d348a66ea3fb35fdb8234b050ec8c779.zip gdb-94afd7a6d348a66ea3fb35fdb8234b050ec8c779.tar.gz gdb-94afd7a6d348a66ea3fb35fdb8234b050ec8c779.tar.bz2 |
* alphafbsd-tdep.c: Update for unwinder changes.
* alpha-linux-tdep.c: Likewise.
* alphanbsd-tdep.c: Likewise.
* alphaobsd-tdep.c: Likewise.
* avr-tdep.c: Likewise.
* cris-tdep.c: Likewise.
* frv-linux-tdep.c: Likewise.
* frv-tdep.c: Likewise.
* h8300-tdep.c: Likewise.
* hppa-linux-tdep.c: Likewise.
* iq2000-tdep.c: Likewise.
* m32c-tdep.c: Likewise.
* m32r-linux-tdep.c: Likewise.
* m32r-tdep.c: Likewise.
* m68hc11-tdep.c: Likewise.
* mep-tdep.c: Likewise.
* mn10300-tdep.c: Likewise.
* mt-tdep.c: Likewise.
* score-tdep.c: Likewise.
* sh64-tdep.c: Likewise.
* sh-tdep.c: Likewise.
* sparc64fbsd-tdep.c: Likewise.
* sparc64nbsd-tdep.c: Likewise.
* sparc64obsd-tdep.c: Likewise.
* v850-tdep.c: Likewise.
* vaxobsd-tdep.c: Likewise.
* vax-tdep.c: Likewise.
* xstormy16-tdep.c: Likewise.
Diffstat (limited to 'gdb/vaxobsd-tdep.c')
-rw-r--r-- | gdb/vaxobsd-tdep.c | 51 |
1 files changed, 21 insertions, 30 deletions
diff --git a/gdb/vaxobsd-tdep.c b/gdb/vaxobsd-tdep.c index 843982c..ed8acf6 100644 --- a/gdb/vaxobsd-tdep.c +++ b/gdb/vaxobsd-tdep.c @@ -57,9 +57,11 @@ static const gdb_byte vaxobsd_sigreturn[] = { }; static int -vaxobsd_sigtramp_p (struct frame_info *next_frame) +vaxobsd_sigtramp_sniffer (const struct frame_unwind *self, + struct frame_info *this_frame, + void **this_cache) { - CORE_ADDR pc = frame_pc_unwind (next_frame); + CORE_ADDR pc = get_frame_pc (this_frame); CORE_ADDR start_pc = (pc & ~(vaxobsd_page_size - 1)); CORE_ADDR sigreturn_addr = start_pc + vaxobsd_sigreturn_offset; gdb_byte *buf; @@ -70,7 +72,7 @@ vaxobsd_sigtramp_p (struct frame_info *next_frame) return 0; buf = alloca(sizeof vaxobsd_sigreturn); - if (!safe_frame_unwind_memory (next_frame, sigreturn_addr, + if (!safe_frame_unwind_memory (this_frame, sigreturn_addr, buf, sizeof vaxobsd_sigreturn)) return 0; @@ -81,7 +83,7 @@ vaxobsd_sigtramp_p (struct frame_info *next_frame) } static struct trad_frame_cache * -vaxobsd_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache) +vaxobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) { struct trad_frame_cache *cache; CORE_ADDR addr, base, func; @@ -89,14 +91,14 @@ vaxobsd_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache) if (*this_cache) return *this_cache; - cache = trad_frame_cache_zalloc (next_frame); + cache = trad_frame_cache_zalloc (this_frame); *this_cache = cache; - func = frame_pc_unwind (next_frame); + func = get_frame_pc (this_frame); func &= ~(vaxobsd_page_size - 1); - base = frame_unwind_register_unsigned (next_frame, VAX_SP_REGNUM); - addr = get_frame_memory_unsigned (next_frame, base - 4, 4); + base = get_frame_register_unsigned (this_frame, VAX_SP_REGNUM); + addr = get_frame_memory_unsigned (this_frame, base - 4, 4); trad_frame_set_reg_addr (cache, VAX_SP_REGNUM, addr + 8); trad_frame_set_reg_addr (cache, VAX_FP_REGNUM, addr + 12); @@ -111,43 +113,32 @@ vaxobsd_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache) } static void -vaxobsd_sigtramp_frame_this_id (struct frame_info *next_frame, +vaxobsd_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id) { struct trad_frame_cache *cache = - vaxobsd_sigtramp_frame_cache (next_frame, this_cache); + vaxobsd_sigtramp_frame_cache (this_frame, this_cache); trad_frame_get_id (cache, this_id); } -static void -vaxobsd_sigtramp_frame_prev_register (struct frame_info *next_frame, - void **this_cache, int regnum, - int *optimizedp, enum lval_type *lvalp, - CORE_ADDR *addrp, int *realnump, - gdb_byte *valuep) +static struct value * +vaxobsd_sigtramp_frame_prev_register (struct frame_info *this_frame, + void **this_cache, int regnum) { struct trad_frame_cache *cache = - vaxobsd_sigtramp_frame_cache (next_frame, this_cache); + vaxobsd_sigtramp_frame_cache (this_frame, this_cache); - trad_frame_get_register (cache, next_frame, regnum, - optimizedp, lvalp, addrp, realnump, valuep); + return trad_frame_get_register (cache, this_frame, regnum); } static const struct frame_unwind vaxobsd_sigtramp_frame_unwind = { SIGTRAMP_FRAME, vaxobsd_sigtramp_frame_this_id, - vaxobsd_sigtramp_frame_prev_register + vaxobsd_sigtramp_frame_prev_register, + NULL, + vaxobsd_sigtramp_sniffer }; - -static const struct frame_unwind * -vaxobsd_sigtramp_frame_sniffer (struct frame_info *next_frame) -{ - if (vaxobsd_sigtramp_p (next_frame)) - return &vaxobsd_sigtramp_frame_unwind; - - return NULL; -} /* OpenBSD a.out. */ @@ -155,7 +146,7 @@ vaxobsd_sigtramp_frame_sniffer (struct frame_info *next_frame) static void vaxobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { - frame_unwind_append_sniffer (gdbarch, vaxobsd_sigtramp_frame_sniffer); + frame_unwind_append_unwinder (gdbarch, &vaxobsd_sigtramp_frame_unwind); } /* FIXME: kettenis/20050821: Since OpenBSD/vax binaries are |