aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc-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
commit236369e7e776877959af5263b5e7a21bcce5e0d3 (patch)
treec4bca62d702aa135124f33f080cc02aebe625769 /gdb/sparc-sol2-tdep.c
parent8374f9d4b51c7bb4464875756b1a4b4e9ce742f0 (diff)
downloadgdb-236369e7e776877959af5263b5e7a21bcce5e0d3.zip
gdb-236369e7e776877959af5263b5e7a21bcce5e0d3.tar.gz
gdb-236369e7e776877959af5263b5e7a21bcce5e0d3.tar.bz2
* 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/sparc-sol2-tdep.c')
-rw-r--r--gdb/sparc-sol2-tdep.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c
index bf0bada..bac1642 100644
--- a/gdb/sparc-sol2-tdep.c
+++ b/gdb/sparc-sol2-tdep.c
@@ -74,7 +74,7 @@ sparc_sol2_pc_in_sigtramp (CORE_ADDR pc, char *name)
}
static struct sparc_frame_cache *
-sparc32_sol2_sigtramp_frame_cache (struct frame_info *next_frame,
+sparc32_sol2_sigtramp_frame_cache (struct frame_info *this_frame,
void **this_cache)
{
struct sparc_frame_cache *cache;
@@ -84,16 +84,16 @@ sparc32_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) + 40;
+ mcontext_addr = get_frame_register_unsigned (this_frame, regnum) + 40;
cache->saved_regs[SPARC32_PSR_REGNUM].addr = mcontext_addr + 0 * 4;
cache->saved_regs[SPARC32_PC_REGNUM].addr = mcontext_addr + 1 * 4;
@@ -105,7 +105,7 @@ sparc32_sol2_sigtramp_frame_cache (struct frame_info *next_frame,
regnum <= SPARC_O7_REGNUM; regnum++, addr += 4)
cache->saved_regs[regnum].addr = addr;
- if (get_frame_memory_unsigned (next_frame, mcontext_addr + 19 * 4, 4))
+ if (get_frame_memory_unsigned (this_frame, mcontext_addr + 19 * 4, 4))
{
/* The register windows haven't been flushed. */
for (regnum = SPARC_L0_REGNUM; regnum <= SPARC_I7_REGNUM; regnum++)
@@ -114,7 +114,7 @@ sparc32_sol2_sigtramp_frame_cache (struct frame_info *next_frame,
else
{
addr = cache->saved_regs[SPARC_SP_REGNUM].addr;
- addr = get_frame_memory_unsigned (next_frame, addr, 4);
+ addr = get_frame_memory_unsigned (this_frame, addr, 4);
for (regnum = SPARC_L0_REGNUM;
regnum <= SPARC_I7_REGNUM; regnum++, addr += 4)
cache->saved_regs[regnum].addr = addr;
@@ -124,51 +124,51 @@ sparc32_sol2_sigtramp_frame_cache (struct frame_info *next_frame,
}
static void
-sparc32_sol2_sigtramp_frame_this_id (struct frame_info *next_frame,
+sparc32_sol2_sigtramp_frame_this_id (struct frame_info *this_frame,
void **this_cache,
struct frame_id *this_id)
{
struct sparc_frame_cache *cache =
- sparc32_sol2_sigtramp_frame_cache (next_frame, this_cache);
+ sparc32_sol2_sigtramp_frame_cache (this_frame, this_cache);
(*this_id) = frame_id_build (cache->base, cache->pc);
}
-static void
-sparc32_sol2_sigtramp_frame_prev_register (struct frame_info *next_frame,
+static struct value *
+sparc32_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 =
- sparc32_sol2_sigtramp_frame_cache (next_frame, this_cache);
+ sparc32_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 sparc32_sol2_sigtramp_frame_unwind =
-{
- SIGTRAMP_FRAME,
- sparc32_sol2_sigtramp_frame_this_id,
- sparc32_sol2_sigtramp_frame_prev_register
-};
-
-static const struct frame_unwind *
-sparc32_sol2_sigtramp_frame_sniffer (struct frame_info *next_frame)
+static int
+sparc32_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 &sparc32_sol2_sigtramp_frame_unwind;
+ return 1;
- return NULL;
+ return 0;
}
+static const struct frame_unwind sparc32_sol2_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ sparc32_sol2_sigtramp_frame_this_id,
+ sparc32_sol2_sigtramp_frame_prev_register,
+ NULL,
+ sparc32_sol2_sigtramp_frame_sniffer
+};
+
/* Unglobalize NAME. */
char *
@@ -229,7 +229,7 @@ sparc32_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Solaris has kernel-assisted single-stepping support. */
set_gdbarch_software_single_step (gdbarch, NULL);
- frame_unwind_append_sniffer (gdbarch, sparc32_sol2_sigtramp_frame_sniffer);
+ frame_unwind_append_unwinder (gdbarch, &sparc32_sol2_sigtramp_frame_unwind);
}