[PATCH] Multi-arch SKIP_SOLIB_RESOLVER

Mark Kettenis kettenis@chello.nl
Sun Nov 9 12:07:00 GMT 2003


I'm working on integrating some mostly SPARC-related patches from
David S. Miller.  There were also some general bits in his tree that
I'm going to check in on mainline.  Here's the first.

Committed as obvious (to mainline).

Mark


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

	From David S. Miller  <davem@redhat.com>:
	* gdbarch.sh (SKIP_SOLIB_RESOLVER): New method.
	* gdbarch.c, gdbarch.h: Regenerated.
	* arch-utils.c (generic_skip_solib_resolver): New function.
	* arch-utils.h (generic_skip_solib_resolver): New prototype.
	* infrun.c (SKIP_SOLIB_RESOLVER): Don't define.

Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.280
diff -u -p -r1.280 gdbarch.sh
--- gdbarch.sh 22 Oct 2003 23:54:11 -0000 1.280
+++ gdbarch.sh 9 Nov 2003 12:03:22 -0000
@@ -700,6 +700,10 @@ f::TARGET_PRINT_INSN:int:print_insn:bfd_
 f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generic_skip_trampoline_code::0
 
 
+# If IN_SOLIB_DYNSYM_RESOLVE_CODE returns true, and SKIP_SOLIB_RESOLVER
+# evaluates non-zero, this is the address where the debugger will place
+# a step-resume breakpoint to get us past the dynamic linker.
+f:2:SKIP_SOLIB_RESOLVER:CORE_ADDR:skip_solib_resolver:CORE_ADDR pc:pc:::generic_skip_solib_resolver::0
 # For SVR4 shared libraries, each call goes through a small piece of
 # trampoline code in the ".plt" section.  IN_SOLIB_CALL_TRAMPOLINE evaluates
 # to nonzero if we are currently stopped in one of these.
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.101
diff -u -p -r1.101 arch-utils.c
--- arch-utils.c 31 Oct 2003 22:19:12 -0000 1.101
+++ arch-utils.c 9 Nov 2003 12:03:22 -0000
@@ -100,6 +100,12 @@ generic_skip_trampoline_code (CORE_ADDR 
   return 0;
 }
 
+CORE_ADDR
+generic_skip_solib_resolver (CORE_ADDR pc)
+{
+  return 0;
+}
+
 int
 generic_in_solib_call_trampoline (CORE_ADDR pc, char *name)
 {
Index: arch-utils.h
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.h,v
retrieving revision 1.59
diff -u -p -r1.59 arch-utils.h
--- arch-utils.h 27 Oct 2003 20:47:27 -0000 1.59
+++ arch-utils.h 9 Nov 2003 12:03:22 -0000
@@ -110,6 +110,8 @@ extern gdbarch_virtual_frame_pointer_fty
 
 extern CORE_ADDR generic_skip_trampoline_code (CORE_ADDR pc);
 
+extern CORE_ADDR generic_skip_solib_resolver (CORE_ADDR pc);
+
 extern int generic_in_solib_call_trampoline (CORE_ADDR pc, char *name);
 
 extern int generic_in_solib_return_trampoline (CORE_ADDR pc, char *name);
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.117
diff -u -p -r1.117 infrun.c
--- infrun.c 24 Oct 2003 17:37:03 -0000 1.117
+++ infrun.c 9 Nov 2003 12:03:25 -0000
@@ -153,10 +153,6 @@ static int may_follow_exec = MAY_FOLLOW_
 #define IN_SOLIB_DYNSYM_RESOLVE_CODE(pc) 0
 #endif
 
-#ifndef SKIP_SOLIB_RESOLVER
-#define SKIP_SOLIB_RESOLVER(pc) 0
-#endif
-
 /* This function returns TRUE if pc is the address of an instruction
    that lies within the dynamic linker (such as the event hook, or the
    dld itself).



More information about the Gdb-patches mailing list