From 0e18d038da8cf16c6e6100e21a34295097a60cf7 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Sat, 23 Feb 2002 22:17:12 +0000 Subject: [PATCH] * arm-linux-tdep.c (arm_linux_init_abi): Register IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE * config/arm/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE): Replace old definition with undef, since we don't want the sysvr4 definition. (SKIP_TRAMPOLINE_CODE): Likewise. --- gdb/ChangeLog | 8 ++++++++ gdb/arm-linux-tdep.c | 6 +++++- gdb/config/arm/tm-linux.h | 16 ++++------------ 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3361c1e..ec1ca5a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2002-02-23 Richard Earnshaw + + * arm-linux-tdep.c (arm_linux_init_abi): Register + IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE + * config/arm/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE): Replace old + definition with undef, since we don't want the sysvr4 definition. + (SKIP_TRAMPOLINE_CODE): Likewise. + 2002-02-23 Andrew Cagney From 2002-02-22 Alfred M. Szmidt : diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 30a698e..af100a5 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -30,7 +30,7 @@ #include "arm-tdep.h" -/* For arm_linux_skip_solib_resolver. */ +/* For shared library handling. */ #include "symtab.h" #include "symfile.h" #include "objfiles.h" @@ -534,6 +534,10 @@ arm_linux_init_abi (struct gdbarch_info info, /* The following two overrides shouldn't be needed. */ set_gdbarch_extract_return_value (gdbarch, arm_linux_extract_return_value); set_gdbarch_push_arguments (gdbarch, arm_linux_push_arguments); + + /* Shared library handling. */ + set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); + set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); } void diff --git a/gdb/config/arm/tm-linux.h b/gdb/config/arm/tm-linux.h index f51756e..6a0d0e4 100644 --- a/gdb/config/arm/tm-linux.h +++ b/gdb/config/arm/tm-linux.h @@ -37,23 +37,15 @@ extern struct link_map_offsets *arm_linux_svr4_fetch_link_map_offsets (void); /* Offset to saved PC in sigcontext structure, from */ #define SIGCONTEXT_PC_OFFSET (sizeof(unsigned long) * 18) -/* On ARM GNU/Linux, each call to a library routine goes through a - small piece of trampoline code in the ".plt" section. The - wait_for_inferior() routine uses this macro to detect when we have - stepped into one of these fragments. We do not use - lookup_solib_trampoline_symbol_by_pc, because we cannot always find - the shared library trampoline symbols. */ -extern int in_plt_section (CORE_ADDR, char *); -#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) in_plt_section((pc), (name)) +/* We've multi-arched this. */ +#undef IN_SOLIB_CALL_TRAMPOLINE /* On ARM GNU/Linux, a call to a library routine does not have to go through any trampoline code. */ #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) 0 -/* If PC is in a shared library trampoline code, return the PC - where the function itself actually starts. If not, return 0. */ -extern CORE_ADDR find_solib_trampoline_target (CORE_ADDR pc); -#define SKIP_TRAMPOLINE_CODE(pc) find_solib_trampoline_target (pc) +/* We've multi-arched this. */ +#undef SKIP_TRAMPOLINE_CODE /* When we call a function in a shared library, and the PLT sends us into the dynamic linker to find the function's real address, we -- 2.7.4