From 5366653e67978dff4051cd8b5326cafd088776f5 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 30 Apr 2008 21:28:57 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 6 ++++++ gdb/hppanbsd-tdep.c | 6 +++--- gdb/m68kbsd-tdep.c | 10 +++++----- gdb/mn10300-linux-tdep.c | 12 ++++++------ gdb/ppc-linux-tdep.c | 26 +++++++++++++------------- gdb/ppcnbsd-tdep.c | 8 ++++---- gdb/sparc-linux-tdep.c | 10 +++++----- gdb/sparc64-linux-tdep.c | 10 +++++----- 8 files changed, 47 insertions(+), 41 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bd869409779..f71f61d37dc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2008-04-30 Daniel Jacobowitz + + * 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 * mipsnbsd-tdep.c, mips64obsd-tdep.c, mips-linux-tdep.c: Update diff --git a/gdb/hppanbsd-tdep.c b/gdb/hppanbsd-tdep.c index e8c31f9e055..d7e4e34ae57 100644 --- a/gdb/hppanbsd-tdep.c +++ b/gdb/hppanbsd-tdep.c @@ -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; diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c index 5cdcf40fe6d..f0478e6d3f5 100644 --- a/gdb/m68kbsd-tdep.c +++ b/gdb/m68kbsd-tdep.c @@ -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); diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c index f9bcbf98ddd..570b07d9934 100644 --- a/gdb/mn10300-linux-tdep.c +++ b/gdb/mn10300-linux-tdep.c @@ -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) { diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 98a41565561..44b66acede5 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -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); diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c index 0d4ad6bcc26..cc99e962ec2 100644 --- a/gdb/ppcnbsd-tdep.c +++ b/gdb/ppcnbsd-tdep.c @@ -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 diff --git a/gdb/sparc-linux-tdep.c b/gdb/sparc-linux-tdep.c index 23c1f2357df..858d0ce7091 100644 --- a/gdb/sparc-linux-tdep.c +++ b/gdb/sparc-linux-tdep.c @@ -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++) { diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c index af22f6187af..906fd122a51 100644 --- a/gdb/sparc64-linux-tdep.c +++ b/gdb/sparc64-linux-tdep.c @@ -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 . */ @@ -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; -- 2.30.2