diff options
-rw-r--r-- | gdb/ChangeLog | 20 | ||||
-rw-r--r-- | gdb/armnbsd-tdep.c | 9 | ||||
-rw-r--r-- | gdb/i386-cygwin-tdep.c | 8 | ||||
-rw-r--r-- | gdb/i386bsd-tdep.c | 12 | ||||
-rw-r--r-- | gdb/m68kbsd-tdep.c | 16 | ||||
-rw-r--r-- | gdb/mips-linux-tdep.c | 4 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 35 | ||||
-rw-r--r-- | gdb/ns32knbsd-tdep.c | 12 | ||||
-rw-r--r-- | gdb/ppc-linux-tdep.c | 40 | ||||
-rw-r--r-- | gdb/sparcnbsd-tdep.c | 11 | ||||
-rw-r--r-- | gdb/vaxnbsd-tdep.c | 14 |
11 files changed, 21 insertions, 160 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f9dbe9c..8e88343 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/armnbsd-tdep.c b/gdb/armnbsd-tdep.c index 0d7c0b5..4767888 100644 --- a/gdb/armnbsd-tdep.c +++ b/gdb/armnbsd-tdep.c @@ -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) diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c index 9dc5b39..e873a67 100644 --- a/gdb/i386-cygwin-tdep.c +++ b/gdb/i386-cygwin-tdep.c @@ -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; diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c index 4b4bffb..c82e310 100644 --- a/gdb/i386bsd-tdep.c +++ b/gdb/i386bsd-tdep.c @@ -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; diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c index c3bc0a4..4ae4d42 100644 --- a/gdb/m68kbsd-tdep.c +++ b/gdb/m68kbsd-tdep.c @@ -126,18 +126,6 @@ m68kbsd_regset_from_core_section (struct gdbarch *gdbarch, 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_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. */ diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index 6cb9c5e..49620ab 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -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 diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index b761349..279509c 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -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); diff --git a/gdb/ns32knbsd-tdep.c b/gdb/ns32knbsd-tdep.c index b241851..26d18e5 100644 --- a/gdb/ns32knbsd-tdep.c +++ b/gdb/ns32knbsd-tdep.c @@ -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_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 diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 96753b6..1c86f0e 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -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". */ diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c index 1dfc13b..bfdb114 100644 --- a/gdb/sparcnbsd-tdep.c +++ b/gdb/sparcnbsd-tdep.c @@ -257,14 +257,6 @@ sparc32nbsd_sigtramp_frame_sniffer (struct frame_info *next_frame) } -/* 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 diff --git a/gdb/vaxnbsd-tdep.c b/gdb/vaxnbsd-tdep.c index f417989..bfcb073 100644 --- a/gdb/vaxnbsd-tdep.c +++ b/gdb/vaxnbsd-tdep.c @@ -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. */ |