summaryrefslogtreecommitdiff
path: root/gdb/sparc64-sol2-tdep.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-05-07 19:30:04 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-05-07 19:30:04 +0000
commitedd80a465b695fb60558234c33fc29691b07721a (patch)
treee8aa379167b9d8768c2cb26009c58ba458f6eb90 /gdb/sparc64-sol2-tdep.c
parent16d688a63042581ca4dc95b2516048b5062b3876 (diff)
downloadgdb-edd80a465b695fb60558234c33fc29691b07721a.tar.gz
* sparc-tdep.c, sparc-tdep.h, sparc-sol2-tdep.c, sparc64-tdep.c,
sparc64-sol2-tdep.c: Update for unwinder changes.
Diffstat (limited to 'gdb/sparc64-sol2-tdep.c')
-rw-r--r--gdb/sparc64-sol2-tdep.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/gdb/sparc64-sol2-tdep.c b/gdb/sparc64-sol2-tdep.c
index 2fb433cf247..edcea4e0caa 100644
--- a/gdb/sparc64-sol2-tdep.c
+++ b/gdb/sparc64-sol2-tdep.c
@@ -48,7 +48,7 @@ const struct sparc_gregset sparc64_sol2_gregset =
static struct sparc_frame_cache *
-sparc64_sol2_sigtramp_frame_cache (struct frame_info *next_frame,
+sparc64_sol2_sigtramp_frame_cache (struct frame_info *this_frame,
void **this_cache)
{
struct sparc_frame_cache *cache;
@@ -58,16 +58,16 @@ sparc64_sol2_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. */
regnum = (cache->frameless_p ? SPARC_O2_REGNUM : SPARC_I2_REGNUM);
- mcontext_addr = frame_unwind_register_unsigned (next_frame, regnum) + 64;
+ mcontext_addr = get_frame_register_unsigned (this_frame, regnum) + 64;
cache->saved_regs[SPARC64_CCR_REGNUM].addr = mcontext_addr + 0 * 8;
cache->saved_regs[SPARC64_PC_REGNUM].addr = mcontext_addr + 1 * 8;
@@ -81,7 +81,7 @@ sparc64_sol2_sigtramp_frame_cache (struct frame_info *next_frame,
regnum <= SPARC_O7_REGNUM; regnum++, addr += 8)
cache->saved_regs[regnum].addr = addr;
- if (get_frame_memory_unsigned (next_frame, mcontext_addr + 21 * 8, 8))
+ if (get_frame_memory_unsigned (this_frame, mcontext_addr + 21 * 8, 8))
{
/* The register windows haven't been flushed. */
for (regnum = SPARC_L0_REGNUM; regnum <= SPARC_I7_REGNUM; regnum++)
@@ -92,7 +92,7 @@ sparc64_sol2_sigtramp_frame_cache (struct frame_info *next_frame,
CORE_ADDR sp;
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;
@@ -102,50 +102,50 @@ sparc64_sol2_sigtramp_frame_cache (struct frame_info *next_frame,
}
static void
-sparc64_sol2_sigtramp_frame_this_id (struct frame_info *next_frame,
+sparc64_sol2_sigtramp_frame_this_id (struct frame_info *this_frame,
void **this_cache,
struct frame_id *this_id)
{
struct sparc_frame_cache *cache =
- sparc64_sol2_sigtramp_frame_cache (next_frame, this_cache);
+ sparc64_sol2_sigtramp_frame_cache (this_frame, this_cache);
(*this_id) = frame_id_build (cache->base, cache->pc);
}
-static void
-sparc64_sol2_sigtramp_frame_prev_register (struct frame_info *next_frame,
+static struct value *
+sparc64_sol2_sigtramp_frame_prev_register (struct frame_info *this_frame,
void **this_cache,
- int regnum, int *optimizedp,
- enum lval_type *lvalp,
- CORE_ADDR *addrp,
- int *realnump, gdb_byte *valuep)
+ int regnum)
{
struct sparc_frame_cache *cache =
- sparc64_sol2_sigtramp_frame_cache (next_frame, this_cache);
+ sparc64_sol2_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 sparc64_sol2_sigtramp_frame_unwind =
-{
- SIGTRAMP_FRAME,
- sparc64_sol2_sigtramp_frame_this_id,
- sparc64_sol2_sigtramp_frame_prev_register
-};
-
-static const struct frame_unwind *
-sparc64_sol2_sigtramp_frame_sniffer (struct frame_info *next_frame)
+static int
+sparc64_sol2_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 (sparc_sol2_pc_in_sigtramp (pc, name))
- return &sparc64_sol2_sigtramp_frame_unwind;
+ return 1;
- return NULL;
+ return 0;
}
+static const struct frame_unwind sparc64_sol2_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ sparc64_sol2_sigtramp_frame_this_id,
+ sparc64_sol2_sigtramp_frame_prev_register,
+ NULL,
+ sparc64_sol2_sigtramp_frame_sniffer
+};
+
void
@@ -153,7 +153,7 @@ sparc64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- frame_unwind_append_sniffer (gdbarch, sparc64_sol2_sigtramp_frame_sniffer);
+ frame_unwind_append_unwinder (gdbarch, &sparc64_sol2_sigtramp_frame_unwind);
sparc64_init_abi (info, gdbarch);