This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: use gdbarch for solib stuff on PPC Linux


The #undefs are ugly, but it seems like that's what other targets are
doing (like config/arm/tm-linux.h).  Since config/tm-linux.h is used
so widely, simply removing the #inclusion of config/tm-svr4.h would be
hard.  Perhaps if we convert the targets that use config/tm-svr4.h
incrementally, with #undefs, we could eventually reach the point where
nobody is using it.

2003-05-29  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.
	* 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.

Index: gdb/ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.28
diff -c -r1.28 ppc-linux-tdep.c
*** gdb/ppc-linux-tdep.c	14 Apr 2003 02:29:40 -0000	1.28
--- gdb/ppc-linux-tdep.c	29 May 2003 18:22:13 -0000
***************
*** 746,751 ****
--- 746,755 ----
        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, find_solib_trampoline_target);
  }
  
  void
Index: gdb/config/powerpc/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/tm-linux.h,v
retrieving revision 1.11
diff -c -r1.11 tm-linux.h
*** gdb/config/powerpc/tm-linux.h	5 Jun 2002 19:18:27 -0000	1.11
--- gdb/config/powerpc/tm-linux.h	29 May 2003 18:22:13 -0000
***************
*** 26,31 ****
--- 26,36 ----
  #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!")


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]