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]

[obish] Zap more complex non-sets of in_solib_call_trampoline


These are the more complex ones. Again while the method is being set, the method isn't used.

Committed,
Andrew
2004-10-31  Andrew Cagney  <cagney@gnu.org>

	* armnbsd-tdep.c (arm_netbsd_aout_init_abi)
	(arm_netbsd_aout_in_solib_call_trampoline): Do not set
	in_solib_call_trampoline, delete corresponding unused function.
	* vaxnbsd-tdep.c (vaxnbsd_aout_in_solib_call_trampoline) 
	(vaxnbsd_aout_init_abi): Ditto.
	* sparcnbsd-tdep.c (sparcnbsd_aout_in_solib_call_trampoline) 
	(sparc32nbsd_aout_init_abi): Ditto.
	* ppc-linux-tdep.c (ppc64_in_solib_call_trampoline) 
	(ppc_linux_init_abi): Ditto.
	* ns32knbsd-tdep.c (ns32knbsd_aout_in_solib_call_trampoline) 
	(ns32knbsd_init_abi_aout): Ditto.
	* mips-tdep.c (mips_in_call_stub, mips_gdbarch_init): Ditto.
	* mips-linux-tdep.c (mips_linux_init_abi): Ditto.
	* m68kbsd-tdep.c (m68kbsd_aout_in_solib_call_trampoline) 
	(m68kbsd_aout_init_abi): Ditto.
	* i386-cygwin-tdep.c (i386_cygwin_in_solib_call_trampoline) 
	(i386_cygwin_init_abi): Ditto.
	* i386bsd-tdep.c (i386bsd_aout_in_solib_call_trampoline) 
	(i386bsd_init_abi): Ditto.

Index: armnbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/armnbsd-tdep.c,v
retrieving revision 1.13
diff -p -u -r1.13 armnbsd-tdep.c
--- armnbsd-tdep.c	23 Aug 2004 10:28:58 -0000	1.13
+++ armnbsd-tdep.c	31 Oct 2004 20:17:07 -0000
@@ -39,15 +39,6 @@ static const char arm_nbsd_arm_be_breakp
 static const char arm_nbsd_thumb_le_breakpoint[] = {0xfe, 0xde};
 static const char arm_nbsd_thumb_be_breakpoint[] = {0xde, 0xfe};
 
-static int
-arm_netbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
-{
-  if (strcmp (name, "_PROCEDURE_LINKAGE_TABLE_") == 0)
-    return 1;
-
-  return 0;
-}
-
 static void
 arm_netbsd_init_abi_common (struct gdbarch_info info,
 			    struct gdbarch *gdbarch)
Index: i386-cygwin-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-cygwin-tdep.c,v
retrieving revision 1.6
diff -p -u -r1.6 i386-cygwin-tdep.c
--- i386-cygwin-tdep.c	29 Jun 2004 18:17:41 -0000	1.6
+++ i386-cygwin-tdep.c	31 Oct 2004 20:17:07 -0000
@@ -32,19 +32,11 @@ i386_cygwin_skip_trampoline_code (CORE_A
   return i386_pe_skip_trampoline_code (pc, NULL);
 }
 
-static int
-i386_cygwin_in_solib_call_trampoline (CORE_ADDR pc, char *name)
-{
-  return (i386_pe_skip_trampoline_code (pc, name) != 0);
-}
-
 static void
 i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
-  set_gdbarch_in_solib_call_trampoline (gdbarch,
-                                        i386_cygwin_in_solib_call_trampoline);
   set_gdbarch_skip_trampoline_code (gdbarch, i386_cygwin_skip_trampoline_code);
 
   tdep->struct_return = reg_struct_return;
Index: i386bsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386bsd-tdep.c,v
retrieving revision 1.24
diff -p -u -r1.24 i386bsd-tdep.c
--- i386bsd-tdep.c	9 Apr 2004 16:28:50 -0000	1.24
+++ i386bsd-tdep.c	31 Oct 2004 20:17:07 -0000
@@ -50,14 +50,6 @@ i386bsd_sigcontext_addr (struct frame_in
 
 /* Support for shared libraries.  */
 
-/* Return non-zero if we are in a shared library trampoline code stub.  */
-
-int
-i386bsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
-{
-  return (name && !strcmp (name, "_DYNAMIC"));
-}
-
 /* Traditional BSD (4.3 BSD, still used for BSDI and 386BSD).  */
 
 /* From <machine/signal.h>.  */
@@ -86,10 +78,6 @@ i386bsd_init_abi (struct gdbarch_info in
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
-  /* Assume SunOS-style shared libraries.  */
-  set_gdbarch_in_solib_call_trampoline (gdbarch,
-					i386bsd_aout_in_solib_call_trampoline);
-
   tdep->jb_pc_offset = 0;
 
   tdep->sigtramp_start = 0xfdbfdfc0;
Index: m68kbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68kbsd-tdep.c,v
retrieving revision 1.3
diff -p -u -r1.3 m68kbsd-tdep.c
--- m68kbsd-tdep.c	31 Oct 2004 19:43:30 -0000	1.3
+++ m68kbsd-tdep.c	31 Oct 2004 20:17:07 -0000
@@ -126,18 +126,6 @@ m68kbsd_regset_from_core_section (struct
 
   return NULL;
 }
-
-
-/* Support for shared libraries.  */
-
-/* Return non-zero if we are in a shared library trampoline code stub.  */
-
-int
-m68kbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
-{
-  return (name && !strcmp (name, "_DYNAMIC"));
-}
-
 
 static void
 m68kbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -161,10 +149,6 @@ m68kbsd_aout_init_abi (struct gdbarch_in
   m68kbsd_init_abi (info, gdbarch);
 
   tdep->struct_return = reg_struct_return;
-
-  /* Assume SunOS-style shared libraries.  */
-  set_gdbarch_in_solib_call_trampoline
-    (gdbarch, m68kbsd_aout_in_solib_call_trampoline);
 }
 
 /* NetBSD ELF.  */
Index: mips-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-linux-tdep.c,v
retrieving revision 1.33
diff -p -u -r1.33 mips-linux-tdep.c
--- mips-linux-tdep.c	30 Oct 2004 23:08:17 -0000	1.33
+++ mips-linux-tdep.c	31 Oct 2004 20:17:08 -0000
@@ -1168,10 +1168,6 @@ mips_linux_init_abi (struct gdbarch_info
   set_gdbarch_skip_solib_resolver (gdbarch, mips_linux_skip_resolver);
 
   set_gdbarch_software_single_step (gdbarch, mips_software_single_step);
-
-  /* This overrides the MIPS16 stub support from mips-tdep.  But no
-     one uses MIPS16 on GNU/Linux yet, so this isn't much of a loss.  */
-  set_gdbarch_in_solib_call_trampoline (gdbarch, mips_linux_in_dynsym_stub);
 }
 
 void
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.360
diff -p -u -r1.360 mips-tdep.c
--- mips-tdep.c	31 Oct 2004 19:25:49 -0000	1.360
+++ mips-tdep.c	31 Oct 2004 20:17:08 -0000
@@ -4537,36 +4537,6 @@ mips_skip_trampoline_code (CORE_ADDR pc)
   return 0;			/* not a stub */
 }
 
-
-/* Return non-zero if the PC is inside a call thunk (aka stub or trampoline).
-   This implements the IN_SOLIB_CALL_TRAMPOLINE macro.  */
-
-static int
-mips_in_call_stub (CORE_ADDR pc, char *name)
-{
-  CORE_ADDR start_addr;
-
-  /* Find the starting address of the function containing the PC.  If the
-     caller didn't give us a name, look it up at the same time.  */
-  if (find_pc_partial_function (pc, name ? NULL : &name, &start_addr, NULL) ==
-      0)
-    return 0;
-
-  if (strncmp (name, "__mips16_call_stub_", 19) == 0)
-    {
-      /* If the PC is in __mips16_call_stub_{1..10}, this is a call stub.  */
-      if (name[19] >= '0' && name[19] <= '9')
-	return 1;
-      /* If the PC at the start of __mips16_call_stub_{s,d}f_{0..10}, i.e.
-         before the jal instruction, this is effectively a call stub.  */
-      else if (name[19] == 's' || name[19] == 'd')
-	return pc == start_addr;
-    }
-
-  return 0;			/* not a stub */
-}
-
-
 /* Return non-zero if the PC is inside a return thunk (aka stub or
    trampoline).  */
 
@@ -5095,10 +5065,7 @@ mips_gdbarch_init (struct gdbarch_info i
      that supports both shared libraries and MIPS16, we'll have to find
      a better place for these.  */
   if (info.osabi == GDB_OSABI_UNKNOWN)
-    {
-      set_gdbarch_in_solib_call_trampoline (gdbarch, mips_in_call_stub);
-      set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_solib_return_trampoline);
-    }
+    set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_solib_return_trampoline);
 
   set_gdbarch_single_step_through_delay (gdbarch, mips_single_step_through_delay);
 
Index: ns32knbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ns32knbsd-tdep.c,v
retrieving revision 1.5
diff -p -u -r1.5 ns32knbsd-tdep.c
--- ns32knbsd-tdep.c	11 Jun 2003 13:16:28 -0000	1.5
+++ ns32knbsd-tdep.c	31 Oct 2004 20:17:08 -0000
@@ -25,15 +25,6 @@
 #include "ns32k-tdep.h"
 #include "gdb_string.h"
 
-static int
-ns32knbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
-{
-  if (strcmp (name, "_DYNAMIC") == 0)
-    return 1;
-
-  return 0;
-}
-
 static void
 ns32knbsd_init_abi_common (struct gdbarch_info info,
                            struct gdbarch *gdbarch)
@@ -47,9 +38,6 @@ ns32knbsd_init_abi_aout (struct gdbarch_
                          struct gdbarch *gdbarch)
 {
   ns32knbsd_init_abi_common (info, gdbarch);
-
-  set_gdbarch_in_solib_call_trampoline (gdbarch,
-                                     ns32knbsd_aout_in_solib_call_trampoline);
 }
 
 static enum gdb_osabi
Index: ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.67
diff -p -u -r1.67 ppc-linux-tdep.c
--- ppc-linux-tdep.c	31 Oct 2004 19:52:46 -0000	1.67
+++ ppc-linux-tdep.c	31 Oct 2004 20:17:09 -0000
@@ -685,43 +685,6 @@ static struct insn_pattern ppc64_standar
 #define PPC64_STANDARD_LINKAGE_LEN \
   (sizeof (ppc64_standard_linkage) / sizeof (ppc64_standard_linkage[0]))
 
-
-/* Recognize a 64-bit PowerPC GNU/Linux linkage function --- what GDB
-   calls a "solib trampoline".  */
-static int
-ppc64_in_solib_call_trampoline (CORE_ADDR pc, char *name)
-{
-  /* Detecting solib call trampolines on PPC64 GNU/Linux is a pain.
-
-     It's not specifically solib call trampolines that are the issue.
-     Any call from one function to another function that uses a
-     different TOC requires a trampoline, to save the caller's TOC
-     pointer and then load the callee's TOC.  An executable or shared
-     library may have more than one TOC, so even intra-object calls
-     may require a trampoline.  Since executable and shared libraries
-     will all have their own distinct TOCs, every inter-object call is
-     also an inter-TOC call, and requires a trampoline --- so "solib
-     call trampolines" are just a special case.
-
-     The 64-bit PowerPC GNU/Linux ABI calls these call trampolines
-     "linkage functions".  Since they need to be near the functions
-     that call them, they all appear in .text, not in any special
-     section.  The .plt section just contains an array of function
-     descriptors, from which the linkage functions load the callee's
-     entry point, TOC value, and environment pointer.  So
-     in_plt_section is useless.  The linkage functions don't have any
-     special linker symbols to name them, either.
-
-     The only way I can see to recognize them is to actually look at
-     their code.  They're generated by ppc_build_one_stub and some
-     other functions in bfd/elf64-ppc.c, so that should show us all
-     the instruction sequences we need to recognize.  */
-  unsigned int insn[PPC64_STANDARD_LINKAGE_LEN];
-
-  return insns_match_pattern (pc, ppc64_standard_linkage, insn);
-}
-
-
 /* When the dynamic linker is doing lazy symbol resolution, the first
    call to a function in another object will go like this:
 
@@ -1098,9 +1061,6 @@ ppc_linux_init_abi (struct gdbarch_info 
          function descriptors).  */
       set_gdbarch_convert_from_func_ptr_addr
         (gdbarch, ppc64_linux_convert_from_func_ptr_addr);
-
-      set_gdbarch_in_solib_call_trampoline
-        (gdbarch, ppc64_in_solib_call_trampoline);
       set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);
 
       /* PPC64 malloc's entry-point is called ".malloc".  */
Index: sparcnbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparcnbsd-tdep.c,v
retrieving revision 1.23
diff -p -u -r1.23 sparcnbsd-tdep.c
--- sparcnbsd-tdep.c	8 Sep 2004 14:24:08 -0000	1.23
+++ sparcnbsd-tdep.c	31 Oct 2004 20:17:09 -0000
@@ -257,14 +257,6 @@ sparc32nbsd_sigtramp_frame_sniffer (stru
 }
 
 
-/* Return non-zero if we are in a shared library trampoline code stub.  */
-
-static int
-sparcnbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
-{
-  return (name && !strcmp (name, "_DYNAMIC"));
-}
-
 static void
 sparc32nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
@@ -287,9 +279,6 @@ static void
 sparc32nbsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   sparc32nbsd_init_abi (info, gdbarch);
-
-  set_gdbarch_in_solib_call_trampoline
-    (gdbarch, sparcnbsd_aout_in_solib_call_trampoline);
 }
 
 static void
Index: vaxnbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/vaxnbsd-tdep.c,v
retrieving revision 1.3
diff -p -u -r1.3 vaxnbsd-tdep.c
--- vaxnbsd-tdep.c	31 Oct 2004 19:43:30 -0000	1.3
+++ vaxnbsd-tdep.c	31 Oct 2004 20:17:09 -0000
@@ -28,25 +28,11 @@
 
 #include "gdb_string.h"
 
-/* Support for shared libraries.  */
-
-/* Return non-zero if we are in a shared library trampoline code stub.  */
-
-int
-vaxnbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
-{
-  return (name && !strcmp (name, "_DYNAMIC"));
-}
-
-
 /* NetBSD a.out.  */
 
 static void
 vaxnbsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  /* Assume SunOS-style shared libraries.  */
-  set_gdbarch_in_solib_call_trampoline
-    (gdbarch, vaxnbsd_aout_in_solib_call_trampoline);
 }
 
 /* NetBSD ELF.  */

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