* 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.
This commit is contained in:
parent
b8a22b9440
commit
5366653e67
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -101,13 +101,13 @@ static const struct tramp_frame hppanbsd_sigtramp_si4 =
|
|||
|
||||
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;
|
||||
|
|
|
@ -136,24 +136,24 @@ m68kbsd_regset_from_core_section (struct gdbarch *gdbarch,
|
|||
|
||||
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);
|
||||
|
@ -161,7 +161,7 @@ m68kobsd_sigtramp_cache_init (const struct tramp_frame *self,
|
|||
|
||||
/* 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);
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ am33_regset_from_core_section (struct gdbarch *gdbarch,
|
|||
|
||||
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);
|
||||
|
||||
|
@ -615,23 +615,23 @@ struct sigcontext {
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -690,7 +690,7 @@ am33_linux_sigframe_cache_init (const struct tramp_frame *self,
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -744,7 +744,7 @@ ppc_linux_regset_from_core_section (struct gdbarch *core_arch,
|
|||
}
|
||||
|
||||
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)
|
||||
|
@ -754,12 +754,12 @@ ppc_linux_sigtramp_cache (struct frame_info *next_frame,
|
|||
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;
|
||||
|
@ -806,11 +806,11 @@ ppc_linux_sigtramp_cache (struct frame_info *next_frame,
|
|||
|
||||
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);
|
||||
|
@ -818,11 +818,11 @@ ppc32_linux_sigaction_cache_init (const struct tramp_frame *self,
|
|||
|
||||
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);
|
||||
|
@ -830,11 +830,11 @@ ppc64_linux_sigaction_cache_init (const struct tramp_frame *self,
|
|||
|
||||
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);
|
||||
|
@ -842,11 +842,11 @@ ppc32_linux_sighandler_cache_init (const struct tramp_frame *self,
|
|||
|
||||
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);
|
||||
|
|
|
@ -104,17 +104,17 @@ static const struct tramp_frame ppcnbsd2_sigtramp;
|
|||
|
||||
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
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
/* 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);
|
||||
|
||||
|
@ -87,14 +87,14 @@ static const struct tramp_frame sparc32_linux_rt_sigframe =
|
|||
|
||||
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;
|
||||
|
||||
|
@ -114,8 +114,8 @@ sparc32_linux_sigframe_init (const struct tramp_frame *self,
|
|||
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++)
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
/* 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);
|
||||
|
||||
|
@ -57,14 +57,14 @@ static const struct tramp_frame sparc64_linux_rt_sigframe =
|
|||
|
||||
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>. */
|
||||
|
@ -84,11 +84,11 @@ sparc64_linux_sigframe_init (const struct tramp_frame *self,
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue