2004-10-31 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Sun, 31 Oct 2004 20:24:32 +0000 (20:24 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sun, 31 Oct 2004 20:24:32 +0000 (20:24 +0000)
* 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.

gdb/ChangeLog
gdb/armnbsd-tdep.c
gdb/i386-cygwin-tdep.c
gdb/i386bsd-tdep.c
gdb/m68kbsd-tdep.c
gdb/mips-linux-tdep.c
gdb/mips-tdep.c
gdb/ns32knbsd-tdep.c
gdb/ppc-linux-tdep.c
gdb/sparcnbsd-tdep.c
gdb/vaxnbsd-tdep.c

index f9dbe9c425aae858bea53667b9a3038fb7d63d2b..8e88343ed9443bb1aacd07d16d05fbaa1983d00a 100644 (file)
@@ -1,5 +1,25 @@
 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.
+
        * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Do not set
        in_solib_call_trampoline to in_plt_entry, IN_SOLIB_CALL_TRAMPOLINE
        isn't used by this architecture.
index 0d7c0b56dca577753db108b6d603b527beab3685..4767888be71289e072a54a1e54a0b45f89a1e14c 100644 (file)
@@ -39,15 +39,6 @@ static const char arm_nbsd_arm_be_breakpoint[] = {0xe6, 0x00, 0x00, 0x11};
 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 9dc5b39c321c4970c21f1c21ba268aa0a48995fc..e873a67bd6250caa3c76dcb22ec529cdfb164eec 100644 (file)
@@ -32,19 +32,11 @@ i386_cygwin_skip_trampoline_code (CORE_ADDR pc)
   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 4b4bffbb4fdc1103ec3f696a76b5c69910201e43..c82e3104328e6a9696af72c6366367d879fb45f5 100644 (file)
@@ -50,14 +50,6 @@ i386bsd_sigcontext_addr (struct frame_info *next_frame)
 
 /* 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 info, struct gdbarch *gdbarch)
 {
   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 c3bc0a46a9f30a8d8c3263de0aee4aaebe816f70..4ae4d423535d030a7711ef59972adc2140a0e629 100644 (file)
@@ -126,18 +126,6 @@ m68kbsd_regset_from_core_section (struct gdbarch *gdbarch,
 
   return NULL;
 }
-\f
-
-/* 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"));
-}
-\f
 
 static void
 m68kbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -161,10 +149,6 @@ m68kbsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   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 6cb9c5e7af6b8655d2cc7d8495a34b2bf918c0a9..49620ab64294ba7ac3170f380e8c95fa6920bb2c 100644 (file)
@@ -1168,10 +1168,6 @@ mips_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   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 b76134907689b9752be31963275e1ca669897000..279509cf87af38eb312d9b21114e3f1d5a8f7bac 100644 (file)
@@ -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 info, struct gdbarch_list *arches)
      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 b241851665f527a9b74e8b4f1e09668024c680b6..26d18e5b277b78c354b61d87efa0a3f82b480afc 100644 (file)
 #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_info info,
                          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 96753b6849c0c0df83f41595c62040a1c2c8e834..1c86f0e74597547bed0d86e46562e01821db8705 100644 (file)
@@ -685,43 +685,6 @@ static struct insn_pattern ppc64_standard_linkage[] =
 #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 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 1dfc13b38684be569f20892c8779463245e522b5..bfdb114d2323652ce753c8214d8cf6fd33b3eea3 100644 (file)
@@ -257,14 +257,6 @@ sparc32nbsd_sigtramp_frame_sniffer (struct frame_info *next_frame)
 }
 \f
 
-/* 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 f4179892217f8b8b79db5cd229b8d3e54dbb12bc..bfcb07301c4406853ec2aefb2e6e026add028fb2 100644 (file)
 
 #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"));
-}
-\f
-
 /* 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.  */
This page took 0.036667 seconds and 4 git commands to generate.