diff options
author | Jim Blandy <jimb@codesourcery.com> | 2003-06-24 23:03:31 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2003-06-24 23:03:31 +0000 |
commit | e716d87a00778a8c31e124f6ea608e3c68fb2117 (patch) | |
tree | d27174f1dcd3281d83354b489251c61767b54bf1 /gdb/ppc-linux-tdep.c | |
parent | d64558a59f6149d9899d3d05edb6b32312f7c77e (diff) | |
download | fsf-binutils-gdb-e716d87a00778a8c31e124f6ea608e3c68fb2117.zip fsf-binutils-gdb-e716d87a00778a8c31e124f6ea608e3c68fb2117.tar.gz fsf-binutils-gdb-e716d87a00778a8c31e124f6ea608e3c68fb2117.tar.bz2 |
* ppc-linux-tdep.c (ppc64_call_dummy_address): New function.
(ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address
method.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r-- | gdb/ppc-linux-tdep.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 2f369cd..5b82a91 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -894,6 +894,18 @@ ppc64_skip_trampoline_code (CORE_ADDR pc) } +/* On 64-bit PowerPC Linux, the ELF header's e_entry field is the + address of a function descriptor for the entry point function, not + the actual entry point itself. So to find the actual address at + which execution should begin, we need to fetch the function's entry + point from that descriptor. */ +static CORE_ADDR +ppc64_call_dummy_address (void) +{ + return ppc64_desc_entry_point (entry_point_address ()); +} + + enum { ELF_NGREG = 48, ELF_NFPREG = 33, @@ -1015,6 +1027,8 @@ ppc_linux_init_abi (struct gdbarch_info info, if (tdep->wordsize == 8) { + set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address); + set_gdbarch_in_solib_call_trampoline (gdbarch, ppc64_in_solib_call_trampoline); set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code); |