]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
authorJim Blandy <jimb@codesourcery.com>
Tue, 10 Jun 2003 17:59:50 +0000 (17:59 +0000)
committerJim Blandy <jimb@codesourcery.com>
Tue, 10 Jun 2003 17:59:50 +0000 (17:59 +0000)
(ppc64_standard_linkage_target): Use it.

gdb/ChangeLog
gdb/ppc-linux-tdep.c

index 6214c911dd704ff3b2663406c1f702a6b080008c..fbb81f28ef37d2e70fd67a91381cb2291033b119 100644 (file)
@@ -1,5 +1,8 @@
 2003-06-10  Jim Blandy  <jimb@redhat.com>
 
+       * ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
+       (ppc64_standard_linkage_target): Use it.
+
        Recognize and skip 64-bit PowerPC Linux linkage functions.
        * ppc-linux-tdep.c (insn_d, insn_ds, insn_xfx, read_insn, struct
        insn_pattern, insns_match_pattern, d_field, ds_field): New
index 50c408f4ea97a1ee5e6578d5c510e5fa37a3bab4..1de0de29defea06405250adc4158a3d662910d70 100644 (file)
@@ -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);
 }