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]

[PATCH] Re-activate skip_solib_resolver on GNU/Linux (ARM & i386)


My skip_solib_resolver patch from yesterday wasn't complete :-(.
Effectively it disabled the functionality on ARM & i386 GNU/Linux.
This situation may very well have caused some regressions (although I
didn't notice them).  It probably depends on whether your glibc has
debugging symbols or not.

The attached should fix things.  Since the change is pretty obvious, I
committed the patch.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* glibc-tdep.h (struct gdbarch): Declare opaque.
	(glibc_skip_solib_resolver): Adjust prototype.
	* glibc-tdep.c (glibc_skip_solib_resolver): Adjust.
	* arm-linux-tdep.c (arm_linux_skip_solib_resolver): Remove.
	(arm_linux_init_abi): Set skip_solib_resolver.
	* i386-linux-tdep.c (i386_linux_skip_solib_resolver): Remove.
	(i386_linux_init_abi): Set skip_solib_resolver.
	* config/arm/tm-linux.h (SKIP_SOLIB_RESOLVER): Remove.
	(arm_linux_skip_solib_resolver): Remove prototype.
	* config/i386/tm-linux.h (SKIP_SOLIB_RESOLVER): Remove.
	(i386_linux_skip_solib_resolver): Remove prototype.

Index: glibc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/glibc-tdep.c,v
retrieving revision 1.1
diff -u -p -r1.1 glibc-tdep.c
--- glibc-tdep.c 9 Nov 2003 17:28:07 -0000 1.1
+++ glibc-tdep.c 15 Nov 2003 13:59:33 -0000
@@ -66,7 +66,7 @@ find_minsym_and_objfile (char *name, str
       trigger when the dynamic linker is done.  */
 
 CORE_ADDR
-glibc_skip_solib_resolver (CORE_ADDR pc)
+glibc_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   /* The GNU dynamic linker is part of the GNU C library, and is used
      by all GNU systems (GNU/Hurd, GNU/Linux).  An unresolved PLT
Index: glibc-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/glibc-tdep.h,v
retrieving revision 1.1
diff -u -p -r1.1 glibc-tdep.h
--- glibc-tdep.h 9 Nov 2003 17:28:07 -0000 1.1
+++ glibc-tdep.h 15 Nov 2003 13:59:33 -0000
@@ -22,6 +22,9 @@
 #ifndef GLIBC_TDEP_H
 #define GLIBC_TDEP_H
 
-extern CORE_ADDR glibc_skip_solib_resolver (CORE_ADDR);
+struct gdbarch;
+
+extern CORE_ADDR glibc_skip_solib_resolver (struct gdbarch *gdbarch,
+					    CORE_ADDR);
 
 #endif /* glibc-tdep.h */
Index: arm-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-linux-tdep.c,v
retrieving revision 1.38
diff -u -p -r1.38 arm-linux-tdep.c
--- arm-linux-tdep.c 9 Nov 2003 17:32:32 -0000 1.38
+++ arm-linux-tdep.c 15 Nov 2003 13:59:35 -0000
@@ -387,12 +387,6 @@ arm_linux_svr4_fetch_link_map_offsets (v
     return lmp;
 }
 
-CORE_ADDR
-arm_linux_skip_solib_resolver (CORE_ADDR pc)
-{
-  return glibc_skip_solib_resolver (pc);
-}
-
 /* The constants below were determined by examining the following files
    in the linux kernel sources:
 
@@ -506,6 +500,7 @@ arm_linux_init_abi (struct gdbarch_info 
   /* Shared library handling.  */
   set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+  set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
 }
 
 void
Index: i386-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-tdep.c,v
retrieving revision 1.33
diff -u -p -r1.33 i386-linux-tdep.c
--- i386-linux-tdep.c 9 Nov 2003 17:32:32 -0000 1.33
+++ i386-linux-tdep.c 15 Nov 2003 13:59:35 -0000
@@ -306,14 +306,6 @@ i386_linux_write_pc (CORE_ADDR pc, ptid_
   write_register_pid (I386_LINUX_ORIG_EAX_REGNUM, -1, ptid);
 }
 
-/* Calling functions in shared libraries.  */
-
-CORE_ADDR
-i386_linux_skip_solib_resolver (CORE_ADDR pc)
-{
-  return glibc_skip_solib_resolver (pc);
-}
-
 /* Fetch (and possibly build) an appropriate link_map_offsets
    structure for native GNU/Linux x86 targets using the struct offsets
    defined in link.h (but without actual reference to that file).
@@ -453,6 +445,7 @@ i386_linux_init_abi (struct gdbarch_info
      to support backtracing through calls to signal handlers.  */
   set_gdbarch_pc_in_sigtramp (gdbarch, i386_linux_pc_in_sigtramp);
 
+  set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
   set_solib_svr4_fetch_link_map_offsets (gdbarch,
 				       i386_linux_svr4_fetch_link_map_offsets);
 }
Index: config/arm/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/tm-linux.h,v
retrieving revision 1.19
diff -u -p -r1.19 tm-linux.h
--- config/arm/tm-linux.h 20 Jun 2003 13:57:29 -0000 1.19
+++ config/arm/tm-linux.h 15 Nov 2003 13:59:35 -0000
@@ -44,14 +44,6 @@
    need to skip over the dynamic linker call.  This function decides
    when to skip, and where to skip to.  See the comments for
    SKIP_SOLIB_RESOLVER at the top of infrun.c.  */
-extern CORE_ADDR arm_linux_skip_solib_resolver (CORE_ADDR pc);
-#define SKIP_SOLIB_RESOLVER arm_linux_skip_solib_resolver
-
-/* 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
-   need to skip over the dynamic linker call.  This function decides
-   when to skip, and where to skip to.  See the comments for
-   SKIP_SOLIB_RESOLVER at the top of infrun.c.  */
 #if 0   
 #undef IN_SOLIB_DYNSYM_RESOLVE_CODE
 extern CORE_ADDR arm_in_solib_dynsym_resolve_code (CORE_ADDR pc, char *name);
Index: config/i386/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-linux.h,v
retrieving revision 1.23
diff -u -p -r1.23 tm-linux.h
--- config/i386/tm-linux.h 10 May 2003 20:14:43 -0000 1.23
+++ config/i386/tm-linux.h 15 Nov 2003 13:59:35 -0000
@@ -29,14 +29,6 @@
 /* The following works around a problem with /usr/include/sys/procfs.h  */
 #define sys_quotactl 1
 
-/* 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
-   need to skip over the dynamic linker call.  This function decides
-   when to skip, and where to skip to.  See the comments for
-   SKIP_SOLIB_RESOLVER at the top of infrun.c.  */
-#define SKIP_SOLIB_RESOLVER i386_linux_skip_solib_resolver
-extern CORE_ADDR i386_linux_skip_solib_resolver (CORE_ADDR pc);
-
 /* N_FUN symbols in shared libaries have 0 for their values and need
    to be relocated. */
 #define SOFUN_ADDRESS_MAYBE_MISSING


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