+2008-04-30 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * hppanbsd-tdep.c, m68kbsd-tdep.c, mn10300-linux-tdep.c,
+ ppc-linux-tdep.c, ppcnbsd-tdep.c, sparc-linux-tdep.c,
+ sparc64-linux-tdep.c: Update for unwinder changes.
+
2008-04-30 Daniel Jacobowitz <dan@codesourcery.com>
* mipsnbsd-tdep.c, mips64obsd-tdep.c, mips-linux-tdep.c: Update
static void
hppanbsd_sigtramp_cache_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
- struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- CORE_ADDR sp = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM);
+ CORE_ADDR sp = get_frame_register_unsigned (this_frame, HPPA_SP_REGNUM);
CORE_ADDR base;
int *reg_offset;
int num_regs;
static void
m68kobsd_sigtramp_cache_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
CORE_ADDR addr, base, pc;
int regnum;
- base = frame_unwind_register_unsigned (next_frame, M68K_SP_REGNUM);
+ base = get_frame_register_unsigned (this_frame, M68K_SP_REGNUM);
/* The 'addql #4,%sp' instruction at offset 8 adjusts the stack
pointer. Adjust the frame base accordingly. */
- pc = frame_unwind_register_unsigned (next_frame, M68K_PC_REGNUM);
+ pc = get_frame_register_unsigned (this_frame, M68K_PC_REGNUM);
if ((pc - func) > 8)
base -= 4;
/* Get frame pointer, stack pointer, program counter and processor
state from `struct sigcontext'. */
- addr = get_frame_memory_unsigned (next_frame, base + 8, 4);
+ addr = get_frame_memory_unsigned (this_frame, base + 8, 4);
trad_frame_set_reg_addr (this_cache, M68K_FP_REGNUM, addr + 8);
trad_frame_set_reg_addr (this_cache, M68K_SP_REGNUM, addr + 12);
trad_frame_set_reg_addr (this_cache, M68K_PC_REGNUM, addr + 20);
/* The sc_ap member of `struct sigcontext' points to additional
hardware state. Here we find the missing registers. */
- addr = get_frame_memory_unsigned (next_frame, addr + 16, 4) + 4;
+ addr = get_frame_memory_unsigned (this_frame, addr + 16, 4) + 4;
for (regnum = M68K_D0_REGNUM; regnum < M68K_FP_REGNUM; regnum++, addr += 4)
trad_frame_set_reg_addr (this_cache, regnum, addr);
\f
static void
am33_linux_sigframe_cache_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func);
static void
am33_linux_sigframe_cache_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
CORE_ADDR sc_base, fpubase;
int i;
- sc_base = frame_unwind_register_unsigned (next_frame, E_SP_REGNUM);
+ sc_base = get_frame_register_unsigned (this_frame, E_SP_REGNUM);
if (self == &am33_linux_sigframe)
{
sc_base += 8;
- sc_base = get_frame_memory_unsigned (next_frame, sc_base, 4);
+ sc_base = get_frame_memory_unsigned (this_frame, sc_base, 4);
}
else
{
sc_base += 12;
- sc_base = get_frame_memory_unsigned (next_frame, sc_base, 4);
+ sc_base = get_frame_memory_unsigned (this_frame, sc_base, 4);
sc_base += 20;
}
trad_frame_set_reg_addr (this_cache, E_PC_REGNUM,
sc_base + AM33_SIGCONTEXT_PC);
- fpubase = get_frame_memory_unsigned (next_frame,
+ fpubase = get_frame_memory_unsigned (this_frame,
sc_base + AM33_SIGCONTEXT_FPUCONTEXT, 4);
if (fpubase)
{
}
static void
-ppc_linux_sigtramp_cache (struct frame_info *next_frame,
+ppc_linux_sigtramp_cache (struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func, LONGEST offset,
int bias)
CORE_ADDR gpregs;
CORE_ADDR fpregs;
int i;
- struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- base = frame_unwind_register_unsigned (next_frame,
- gdbarch_sp_regnum (gdbarch));
- if (bias > 0 && frame_pc_unwind (next_frame) != func)
+ base = get_frame_register_unsigned (this_frame,
+ gdbarch_sp_regnum (gdbarch));
+ if (bias > 0 && get_frame_pc (this_frame) != func)
/* See below, some signal trampolines increment the stack as their
first instruction, need to compensate for that. */
base -= bias;
static void
ppc32_linux_sigaction_cache_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
- ppc_linux_sigtramp_cache (next_frame, this_cache, func,
+ ppc_linux_sigtramp_cache (this_frame, this_cache, func,
0xd0 /* Offset to ucontext_t. */
+ 0x30 /* Offset to .reg. */,
0);
static void
ppc64_linux_sigaction_cache_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
- ppc_linux_sigtramp_cache (next_frame, this_cache, func,
+ ppc_linux_sigtramp_cache (this_frame, this_cache, func,
0x80 /* Offset to ucontext_t. */
+ 0xe0 /* Offset to .reg. */,
128);
static void
ppc32_linux_sighandler_cache_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
- ppc_linux_sigtramp_cache (next_frame, this_cache, func,
+ ppc_linux_sigtramp_cache (this_frame, this_cache, func,
0x40 /* Offset to ucontext_t. */
+ 0x1c /* Offset to .reg. */,
0);
static void
ppc64_linux_sighandler_cache_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
- ppc_linux_sigtramp_cache (next_frame, this_cache, func,
+ ppc_linux_sigtramp_cache (this_frame, this_cache, func,
0x80 /* Offset to struct sigcontext. */
+ 0x38 /* Offset to .reg. */,
128);
static void
ppcnbsd_sigtramp_cache_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
- struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
CORE_ADDR addr, base;
int i;
- base = frame_unwind_register_unsigned (next_frame,
- gdbarch_sp_regnum (gdbarch));
+ base = get_frame_register_unsigned (this_frame,
+ gdbarch_sp_regnum (gdbarch));
if (self == &ppcnbsd2_sigtramp)
addr = base + 0x10 + 2 * tdep->wordsize;
else
/* Signal trampoline support. */
static void sparc32_linux_sigframe_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func);
static void
sparc32_linux_sigframe_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
CORE_ADDR base, addr, sp_addr;
int regnum;
- base = frame_unwind_register_unsigned (next_frame, SPARC_O1_REGNUM);
+ base = get_frame_register_unsigned (this_frame, SPARC_O1_REGNUM);
if (self == &sparc32_linux_rt_sigframe)
base += 128;
addr += 4;
}
- base = frame_unwind_register_unsigned (next_frame, SPARC_SP_REGNUM);
- addr = get_frame_memory_unsigned (next_frame, sp_addr, 4);
+ base = get_frame_register_unsigned (this_frame, SPARC_SP_REGNUM);
+ addr = get_frame_memory_unsigned (this_frame, sp_addr, 4);
for (regnum = SPARC_L0_REGNUM; regnum <= SPARC_I7_REGNUM; regnum++)
{
/* Signal trampoline support. */
static void sparc64_linux_sigframe_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func);
static void
sparc64_linux_sigframe_init (const struct tramp_frame *self,
- struct frame_info *next_frame,
+ struct frame_info *this_frame,
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
CORE_ADDR base, addr, sp_addr;
int regnum;
- base = frame_unwind_register_unsigned (next_frame, SPARC_O1_REGNUM);
+ base = get_frame_register_unsigned (this_frame, SPARC_O1_REGNUM);
base += 128;
/* Offsets from <bits/sigcontext.h>. */
trad_frame_set_reg_addr (this_cache, SPARC64_Y_REGNUM, addr + 24);
trad_frame_set_reg_addr (this_cache, SPARC64_FPRS_REGNUM, addr + 28);
- base = frame_unwind_register_unsigned (next_frame, SPARC_SP_REGNUM);
+ base = get_frame_register_unsigned (this_frame, SPARC_SP_REGNUM);
if (base & 1)
base += BIAS;
- addr = get_frame_memory_unsigned (next_frame, sp_addr, 8);
+ addr = get_frame_memory_unsigned (this_frame, sp_addr, 8);
if (addr & 1)
addr += BIAS;