summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-06-13 23:07:19 +0000
committerJim Blandy <jimb@codesourcery.com>2003-06-13 23:07:19 +0000
commit42ba0959de3ed742a55a50502ccb234ea919b527 (patch)
tree09b6b69da308a77b5391ab246c7e0d32b36a413c
parent830ba71c0b627f0db2a0a655d207e0984fbf21c5 (diff)
downloadgdb-42ba0959de3ed742a55a50502ccb234ea919b527.tar.gz
* ppc-linux-tdep.c (ppc64_call_dummy_address): New function.
(ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address method.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/ppc-linux-tdep.c14
2 files changed, 18 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 01070fc4f89..990f5d23be5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2003-06-13 Jim Blandy <jimb@redhat.com>
+ * ppc-linux-tdep.c (ppc64_call_dummy_address): New function.
+ (ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address
+ method.
+
* ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
(ppc64_standard_linkage_target): Use it.
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index a0954ef75db..600f5f20e3d 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);