aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc64fbsd-tdep.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-06-28 17:29:04 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-06-28 17:29:04 +0000
commit94afd7a6d348a66ea3fb35fdb8234b050ec8c779 (patch)
treedbf3f5264799c070696da08515f2d6260ce9df42 /gdb/sparc64fbsd-tdep.c
parente111d6c9206464acdff70102b29d82b4b48d1fc1 (diff)
downloadgdb-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/sparc64fbsd-tdep.c')
-rw-r--r--gdb/sparc64fbsd-tdep.c61
1 files changed, 30 insertions, 31 deletions
diff --git a/gdb/sparc64fbsd-tdep.c b/gdb/sparc64fbsd-tdep.c
index 83694ff..77cb2d9 100644
--- a/gdb/sparc64fbsd-tdep.c
+++ b/gdb/sparc64fbsd-tdep.c
@@ -90,7 +90,7 @@ sparc64fbsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
}
static struct sparc_frame_cache *
-sparc64fbsd_sigtramp_frame_cache (struct frame_info *next_frame,
+sparc64fbsd_sigtramp_frame_cache (struct frame_info *this_frame,
void **this_cache)
{
struct sparc_frame_cache *cache;
@@ -101,15 +101,15 @@ sparc64fbsd_sigtramp_frame_cache (struct frame_info *next_frame,
if (*this_cache)
return *this_cache;
- cache = sparc_frame_cache (next_frame, this_cache);
+ cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
- cache->saved_regs = trad_frame_alloc_saved_regs (next_frame);
+ cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
/* The third argument is a pointer to an instance of `ucontext_t',
which has a member `uc_mcontext' that contains the saved
registers. */
- addr = frame_unwind_register_unsigned (next_frame, SPARC_O2_REGNUM);
+ addr = get_frame_register_unsigned (this_frame, SPARC_O2_REGNUM);
mcontext_addr = addr + 64;
/* The following registers travel in the `mc_local' slots of
@@ -136,7 +136,7 @@ sparc64fbsd_sigtramp_frame_cache (struct frame_info *next_frame,
/* The `local' and `in' registers have been saved in the register
save area. */
addr = cache->saved_regs[SPARC_SP_REGNUM].addr;
- sp = get_frame_memory_unsigned (next_frame, addr, 8);
+ sp = get_frame_memory_unsigned (this_frame, addr, 8);
for (regnum = SPARC_L0_REGNUM, addr = sp + BIAS;
regnum <= SPARC_I7_REGNUM; regnum++, addr += 8)
cache->saved_regs[regnum].addr = addr;
@@ -147,7 +147,7 @@ sparc64fbsd_sigtramp_frame_cache (struct frame_info *next_frame,
#define FPRS_FEF (1 << 2)
addr = cache->saved_regs[SPARC64_FPRS_REGNUM].addr;
- fprs = get_frame_memory_unsigned (next_frame, addr, 8);
+ fprs = get_frame_memory_unsigned (this_frame, addr, 8);
if (fprs & FPRS_FEF)
{
for (regnum = SPARC_F0_REGNUM, addr = mcontext_addr + 32 * 8;
@@ -163,50 +163,49 @@ sparc64fbsd_sigtramp_frame_cache (struct frame_info *next_frame,
}
static void
-sparc64fbsd_sigtramp_frame_this_id (struct frame_info *next_frame,
+sparc64fbsd_sigtramp_frame_this_id (struct frame_info *this_frame,
void **this_cache,
struct frame_id *this_id)
{
struct sparc_frame_cache *cache =
- sparc64fbsd_sigtramp_frame_cache (next_frame, this_cache);
+ sparc64fbsd_sigtramp_frame_cache (this_frame, this_cache);
(*this_id) = frame_id_build (cache->base, cache->pc);
}
-static void
-sparc64fbsd_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 *
+sparc64fbsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
+ void **this_cache, int regnum)
{
struct sparc_frame_cache *cache =
- sparc64fbsd_sigtramp_frame_cache (next_frame, this_cache);
+ sparc64fbsd_sigtramp_frame_cache (this_frame, this_cache);
- trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
}
-static const struct frame_unwind sparc64fbsd_sigtramp_frame_unwind =
-{
- SIGTRAMP_FRAME,
- sparc64fbsd_sigtramp_frame_this_id,
- sparc64fbsd_sigtramp_frame_prev_register
-};
-
-static const struct frame_unwind *
-sparc64fbsd_sigtramp_frame_sniffer (struct frame_info *next_frame)
+static int
+sparc64fbsd_sigtramp_frame_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);
char *name;
find_pc_partial_function (pc, &name, NULL, NULL);
if (sparc64fbsd_pc_in_sigtramp (pc, name))
- return &sparc64fbsd_sigtramp_frame_unwind;
+ return 1;
- return NULL;
+ return 0;
}
+
+static const struct frame_unwind sparc64fbsd_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ sparc64fbsd_sigtramp_frame_this_id,
+ sparc64fbsd_sigtramp_frame_prev_register,
+ NULL,
+ sparc64fbsd_sigtramp_frame_sniffer
+};
static void
@@ -222,7 +221,7 @@ sparc64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
sparc64fbsd_collect_fpregset);
tdep->sizeof_fpregset = 272;
- frame_unwind_append_sniffer (gdbarch, sparc64fbsd_sigtramp_frame_sniffer);
+ frame_unwind_append_unwinder (gdbarch, &sparc64fbsd_sigtramp_frame_unwind);
sparc64_init_abi (info, gdbarch);