]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use gdbarch methods for solib stuff on PowerPC Linux.
authorJim Blandy <jimb@codesourcery.com>
Thu, 5 Jun 2003 22:51:47 +0000 (22:51 +0000)
committerJim Blandy <jimb@codesourcery.com>
Thu, 5 Jun 2003 22:51:47 +0000 (22:51 +0000)
* config/powerpc/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE,
SKIP_TRAMPOLINE_CODE): #undef these, so the gdbarch methods will
show through.  Remove later #definition of SKIP_TRAMPOLINE_CODE.
(ppc_linux_skip_trampoline_code): Delete declaration.
* ppc-linux-tdep.c (ppc_linux_init_abi): Register
IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE methods here,
giving the same effect as the #definitions above.
(ppc_linux_skip_trampoline_code): Make this static.

gdb/ChangeLog
gdb/config/powerpc/tm-linux.h
gdb/ppc-linux-tdep.c

index ebe8238129ede071293e598f0b93cdd74f205c5e..a86142a838dae34f212703c2a51d04b922b823d9 100644 (file)
@@ -1,3 +1,15 @@
+2003-06-05  Jim Blandy  <jimb@redhat.com>
+
+       Use gdbarch methods for solib stuff on PowerPC Linux.
+       * config/powerpc/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE,
+       SKIP_TRAMPOLINE_CODE): #undef these, so the gdbarch methods will
+       show through.  Remove later #definition of SKIP_TRAMPOLINE_CODE.
+       (ppc_linux_skip_trampoline_code): Delete declaration.
+       * ppc-linux-tdep.c (ppc_linux_init_abi): Register
+       IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE methods here,
+       giving the same effect as the #definitions above.
+       (ppc_linux_skip_trampoline_code): Make this static.
+
 2003-05-29  Jim Blandy  <jimb@redhat.com>
 
        Support gdbserver on 64-bit PowerPC Linux.
index d69dfc1f5bfd4abf52b8665ac9085250f9fcf056..34d95cadca47aee78b231806a8638734afb9efed 100644 (file)
@@ -26,6 +26,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #undef SKIP_TRAMPOLINE_CODE
 #include "config/tm-linux.h"
 
+/* We've multi-arched these.  (Note that this completely undoes the
+   effect of config/tm-linux.h #including config/tm-sysv4.h.)  */
+#undef IN_SOLIB_CALL_TRAMPOLINE
+#undef SKIP_TRAMPOLINE_CODE
+
 /* We can single step on linux */
 #undef  SOFTWARE_SINGLE_STEP
 #define SOFTWARE_SINGLE_STEP(p,q) internal_error (__FILE__, __LINE__, "Will never execute!")
@@ -43,10 +48,6 @@ extern int at_subroutine_call_instruction_target();
    in symfile.c) */
 #undef IBM6000_TARGET
 
-extern CORE_ADDR ppc_linux_skip_trampoline_code (CORE_ADDR pc);
-#undef SKIP_TRAMPOLINE_CODE
-#define        SKIP_TRAMPOLINE_CODE(pc) ppc_linux_skip_trampoline_code (pc)
-
 extern int ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name);
 #undef IN_SIGTRAMP
 #define IN_SIGTRAMP(pc,func_name) ppc_linux_in_sigtramp (pc,func_name)
index 9284751fd0ccac23f2b4bbccfed381fcb666733e..7080b1696aaaf18baeec6b1998b4640b05ca22e4 100644 (file)
@@ -229,7 +229,7 @@ ppc_linux_at_sigtramp_return_path (CORE_ADDR pc)
            && insn_is_sigreturn (extract_unsigned_integer (buf, 4))));
 }
 
-CORE_ADDR
+static CORE_ADDR
 ppc_linux_skip_trampoline_code (CORE_ADDR pc)
 {
   char buf[4];
@@ -746,6 +746,10 @@ ppc_linux_init_abi (struct gdbarch_info info,
       set_solib_svr4_fetch_link_map_offsets
         (gdbarch, ppc_linux_svr4_fetch_link_map_offsets);
     }
+
+  /* Shared library handling.  */
+  set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
+  set_gdbarch_skip_trampoline_code (gdbarch, ppc_linux_skip_trampoline_code);
 }
 
 void