aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-hpux-tdep.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-06-15 22:39:52 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-06-15 22:39:52 +0000
commit52f729a7241c0187f9ed31542d7e9a1ec98f63b7 (patch)
treee657c6a68b7f22d5dcf8f4eea3de2a99d515d7ad /gdb/hppa-hpux-tdep.c
parent0b1b3e423ad28731135cdd275522bdf3d2d17570 (diff)
downloadgdb-52f729a7241c0187f9ed31542d7e9a1ec98f63b7.zip
gdb-52f729a7241c0187f9ed31542d7e9a1ec98f63b7.tar.gz
gdb-52f729a7241c0187f9ed31542d7e9a1ec98f63b7.tar.bz2
* gdbarch.sh (skip_trampoline_code): Add FRAME argument.
* gdbarch.c, gdbarch.h: Regenerate. * arch-utils.c (generic_skip_trampoline_code): Add FRAME argument. * arch-utils.h (generic_skip_trampoline_code): Likewise. * infrun.c (handle_inferior_event): Pass current frame to gdbarch_skip_trampoline_code and skip_language_trampoline. * language.c (unk_lang_trampoline): Add FRAME argument. (skip_language_trampoline): Add FRAME argument. Pass it to skip_trampoline callback. * language.h: Add forward declaration of struct frame_info. (struct language_defn): Add FRAME argument to skip_trampoline. (skip_language_trampoline): Add FRAME argument. * cp-abi.c (cplus_skip_trampoline): Add FRAME argument. Pass it to skip_trampoline callback. * cp-abi.h: Add forward declaration of struct frame_info. (cplus_skip_trampoline): Add FRAME argument. (struct cp_abi_ops): Add FRAME argument to skip_trampoline callback. * gnu-v3-abi.c (gnuv3_skip_trampoline): Add FRAME argument. Pass it to gdbarch_skip_trampoline_code. * objc-lang.c (objc_skip_trampoline): Add FRAME argument. Pass it to gdbarch_skip_trampoline_code. * minsyms.c (find_solib_trampoline_target): Add FRAME argument. * symtab.h (find_solib_trampoline_target): Likewise. * obsd-tdep.c (obsd_skip_solib_resolver): Pass current frame to find_solib_trampoline_target. * arm-tdep.c (arm_skip_stub): Add FRAME argument. Read registers from FRAME instead of calling read_register. * hppa-hpux-tdep.c (hppa_hpux_skip_trampoline_code): Add FRAME argument. Read registers from FRAME instead of using read_register. * hppa-tdep.c (hppa_skip_trampoline_code): Likewise. * hppa-tdep.h (hppa_skip_trampoline_code): Add FRAME argument. * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Add FRAME argument. * m32c-tdep.c (m32c_skip_trampoline_code): Add FRAME argument. * mips-tdep.c (mips_skip_trampoline_code): Add FRAME argument. Read registers from FRAME instead of using read_signed_register. * ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Add FRAME argument. (ppc64_standard_linkage_target): Likewise. Read registers from FRAME instead of using read_register. (ppc64_skip_trampoline_code): Add FRAME argument. Pass it to ppc64_standard_linkage_target. * rs6000-tdep.c (rs6000_skip_trampoline_code): Add FRAME argument. Pass it to find_solib_trampoline_target. Read registers from FRAME instead of using read_register. * xstormy16-tdep.c (xstormy16_skip_trampoline_code): Add FRAME argument.
Diffstat (limited to 'gdb/hppa-hpux-tdep.c')
-rw-r--r--gdb/hppa-hpux-tdep.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 1510d87..195d907 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -299,7 +299,7 @@ hppa_hpux_in_solib_return_trampoline (CORE_ADDR pc, char *name)
used in dynamic executables. */
static CORE_ADDR
-hppa_hpux_skip_trampoline_code (CORE_ADDR pc)
+hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
long orig_pc = pc;
long prev_inst, curr_inst, loc;
@@ -310,7 +310,7 @@ hppa_hpux_skip_trampoline_code (CORE_ADDR pc)
of the function. So we may have to do something special. */
if (pc == hppa_symbol_address("$$dyncall"))
{
- pc = (CORE_ADDR) read_register (22);
+ pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
/* If bit 30 (counting from the left) is on, then pc is the address of
the PLT entry for this function, not the address of the function
@@ -321,12 +321,12 @@ hppa_hpux_skip_trampoline_code (CORE_ADDR pc)
}
if (pc == hppa_symbol_address("$$dyncall_external"))
{
- pc = (CORE_ADDR) read_register (22);
+ pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
pc = (CORE_ADDR) read_memory_integer
(pc & ~0x3, gdbarch_ptr_bit (current_gdbarch) / 8);
}
else if (pc == hppa_symbol_address("_sr4export"))
- pc = (CORE_ADDR) (read_register (22));
+ pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
/* Get the unwind descriptor corresponding to PC, return zero
if no unwind was found. */
@@ -500,8 +500,11 @@ hppa_hpux_skip_trampoline_code (CORE_ADDR pc)
/* Yup. See if the previous instruction loaded
rp from sp - 8. */
if (prev_inst == 0x4bc23ff1)
- return (read_memory_integer
- (read_register (HPPA_SP_REGNUM) - 8, 4)) & ~0x3;
+ {
+ CORE_ADDR sp;
+ sp = get_frame_register_unsigned (frame, HPPA_SP_REGNUM);
+ return read_memory_integer (sp - 8, 4) & ~0x3;
+ }
else
{
warning (_("Unable to find restore of %%rp before bv (%%rp)."));
@@ -515,7 +518,7 @@ hppa_hpux_skip_trampoline_code (CORE_ADDR pc)
else if ((curr_inst & 0xffe0f000) == 0xe840d000)
{
return (read_memory_integer
- (read_register (HPPA_SP_REGNUM) - 24,
+ (get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24,
gdbarch_ptr_bit (current_gdbarch) / 8)) & ~0x3;
}
@@ -528,7 +531,7 @@ hppa_hpux_skip_trampoline_code (CORE_ADDR pc)
I guess we could check for the previous instruction being
mtsp %r1,%sr0 if we want to do sanity checking. */
return (read_memory_integer
- (read_register (HPPA_SP_REGNUM) - 24,
+ (get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24,
gdbarch_ptr_bit (current_gdbarch) / 8)) & ~0x3;
}