summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-06-13 23:03:59 +0000
committerJim Blandy <jimb@codesourcery.com>2003-06-13 23:03:59 +0000
commitad7b71d775d5cf07a4c58363c8a97e1aad4dc26f (patch)
treeda351ccc2c3799ac7bb97ca91f843af73e531476
parent11308f70b39a78aae01eb7b0fbe5e23e9a8313ee (diff)
downloadbinutils-gdb-ad7b71d775d5cf07a4c58363c8a97e1aad4dc26f.tar.gz
* ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
(ppc64_standard_linkage_target): Use it.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/ppc-linux-tdep.c12
2 files changed, 14 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5237edf51f2..01070fc4f89 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2003-06-13 Jim Blandy <jimb@redhat.com>
+ * ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
+ (ppc64_standard_linkage_target): Use it.
+
* solib-svr4.c (solib_break_names): Recognize the 64-bit PowerPC
Linux entry point symbols for _dl_debug_state, too.
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index f2d76b8b11b..a0954ef75db 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -731,6 +731,16 @@ insn_ds_field (unsigned int insn)
}
+/* If DESC is the address of a 64-bit PowerPC Linux function
+ descriptor, return the descriptor's entry point. */
+static CORE_ADDR
+ppc64_desc_entry_point (CORE_ADDR desc)
+{
+ /* The first word of the descriptor is the entry point. */
+ return (CORE_ADDR) read_memory_unsigned_integer (desc, 8);
+}
+
+
/* Pattern for the standard linkage function. These are built by
build_plt_stub in elf64-ppc.c, whose GLINK argument is always
zero. */
@@ -865,7 +875,7 @@ ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn)
+ insn_ds_field (insn[2]));
/* The first word of the descriptor is the entry point. Return that. */
- return (CORE_ADDR) read_memory_unsigned_integer (desc, 8);
+ return ppc64_desc_entry_point (desc);
}