summaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-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
commitcc0cc945444222df6db06b8eecbf9096dac38a8b (patch)
tree9468940bffe6d9f889a5608db0ba31602cc797e4 /gdb/ppc-linux-tdep.c
parentf4f49bd05fefcb8ac95c380e3775ec1a39b02732 (diff)
downloadgdb-cc0cc945444222df6db06b8eecbf9096dac38a8b.tar.gz
* 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/ppc-linux-tdep.c')
-rw-r--r--gdb/ppc-linux-tdep.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 9eff5b0f71a..5834b6d2de4 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -86,7 +86,7 @@
static CORE_ADDR
-ppc_linux_skip_trampoline_code (CORE_ADDR pc)
+ppc_linux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
gdb_byte buf[4];
struct obj_section *sect;
@@ -557,14 +557,16 @@ static struct insn_pattern ppc64_standard_linkage[] =
standard linkage function will send them. (This doesn't deal with
dynamic linker lazy symbol resolution stubs.) */
static CORE_ADDR
-ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn)
+ppc64_standard_linkage_target (struct frame_info *frame,
+ CORE_ADDR pc, unsigned int *insn)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (frame));
/* The address of the function descriptor this linkage function
references. */
CORE_ADDR desc
- = ((CORE_ADDR) read_register (tdep->ppc_gp0_regnum + 2)
+ = ((CORE_ADDR) get_frame_register_unsigned (frame,
+ tdep->ppc_gp0_regnum + 2)
+ (insn_d_field (insn[0]) << 16)
+ insn_ds_field (insn[2]));
@@ -576,13 +578,14 @@ ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn)
/* Given that we've begun executing a call trampoline at PC, return
the entry point of the function the trampoline will go to. */
static CORE_ADDR
-ppc64_skip_trampoline_code (CORE_ADDR pc)
+ppc64_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
unsigned int ppc64_standard_linkage_insn[PPC64_STANDARD_LINKAGE_LEN];
if (insns_match_pattern (pc, ppc64_standard_linkage,
ppc64_standard_linkage_insn))
- return ppc64_standard_linkage_target (pc, ppc64_standard_linkage_insn);
+ return ppc64_standard_linkage_target (frame, pc,
+ ppc64_standard_linkage_insn);
else
return 0;
}