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

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

index 1e88daf5f9ab65d49e4fbffc12a5a36b83c2dd85..e053db752b2e69665ea3d31b2cef5932c91f814d 100644 (file)
@@ -1,5 +1,8 @@
 2003-06-06  Jim Blandy  <jimb@redhat.com>
 
+       * ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
+       (ppc64_standard_linkage_target): Use it.
+
        * ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area
        offsets for floating-point registers in both 32- and 64-bit
        interfaces.
index 0000101c2623bdfd9fea77d0325d761ade787660..900a8d91ee0e90e39acebb680f492dfb86d2017d 100644 (file)
@@ -730,6 +730,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.  */
@@ -864,7 +874,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);
 }