aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-11-14 21:22:42 +0000
committerMark Kettenis <kettenis@gnu.org>2003-11-14 21:22:42 +0000
commit4c8c40e6cbcbf0f68cb32dfb71417197b2b25316 (patch)
treed0a54fb6e54426187ec62e8730286cdc3187633e
parent0e5d83e3b65b364eadc28d31007be1f284a651d3 (diff)
downloadgdb-4c8c40e6cbcbf0f68cb32dfb71417197b2b25316.zip
gdb-4c8c40e6cbcbf0f68cb32dfb71417197b2b25316.tar.gz
gdb-4c8c40e6cbcbf0f68cb32dfb71417197b2b25316.tar.bz2
* gdbarch.sh (skip_solib_resolver): Change into a multi-arch
function. * gdbarch.c, gdbarch.h: Regenerate. * infrun.c (handle_inferior_event): Call gdbarch_skip_solib_resolver instead of SKIP_SOLIB_RESOLVER. * arch-utils.c (generic_in_solib_call_trampoline): Adjust function definition. * arch-utils.h (generic_in_solib_call_trampoline): Adjust function prototype.
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/arch-utils.c2
-rw-r--r--gdb/arch-utils.h3
-rw-r--r--gdb/gdbarch.c15
-rw-r--r--gdb/gdbarch.h8
-rwxr-xr-xgdb/gdbarch.sh2
-rw-r--r--gdb/infrun.c3
7 files changed, 23 insertions, 22 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 94ef4d2..cc68252 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,15 @@
+2003-11-14 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbarch.sh (skip_solib_resolver): Change into a multi-arch
+ function.
+ * gdbarch.c, gdbarch.h: Regenerate.
+ * infrun.c (handle_inferior_event): Call
+ gdbarch_skip_solib_resolver instead of SKIP_SOLIB_RESOLVER.
+ * arch-utils.c (generic_in_solib_call_trampoline): Adjust function
+ definition.
+ * arch-utils.h (generic_in_solib_call_trampoline): Adjust function
+ prototype.
+
2003-11-14 Jeff Johnston <jjohnstn@redhat.com>
* libunwind-frame.c: New file.
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 4234cb6..a5d8a1c 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -103,7 +103,7 @@ generic_skip_trampoline_code (CORE_ADDR pc)
}
CORE_ADDR
-generic_skip_solib_resolver (CORE_ADDR pc)
+generic_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
return 0;
}
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 32fbc4d..9cc8b00 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -110,7 +110,8 @@ extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer;
extern CORE_ADDR generic_skip_trampoline_code (CORE_ADDR pc);
-extern CORE_ADDR generic_skip_solib_resolver (CORE_ADDR pc);
+extern CORE_ADDR generic_skip_solib_resolver (struct gdbarch *gdbarch,
+ CORE_ADDR pc);
extern int generic_in_solib_call_trampoline (CORE_ADDR pc, char *name);
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index f73a4f6..bac577b 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -420,7 +420,7 @@ struct gdbarch startup_gdbarch =
0, /* software_single_step */
0, /* print_insn */
0, /* skip_trampoline_code */
- 0, /* skip_solib_resolver */
+ generic_skip_solib_resolver, /* skip_solib_resolver */
0, /* in_solib_call_trampoline */
0, /* in_solib_return_trampoline */
0, /* pc_in_sigtramp */
@@ -2217,16 +2217,9 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
(long) current_gdbarch->skip_prologue
/*SKIP_PROLOGUE ()*/);
#endif
-#ifdef SKIP_SOLIB_RESOLVER
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "SKIP_SOLIB_RESOLVER(pc)",
- XSTRING (SKIP_SOLIB_RESOLVER (pc)));
- fprintf_unfiltered (file,
- "gdbarch_dump: SKIP_SOLIB_RESOLVER = <0x%08lx>\n",
- (long) current_gdbarch->skip_solib_resolver
- /*SKIP_SOLIB_RESOLVER ()*/);
-#endif
+ "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
+ (long) current_gdbarch->skip_solib_resolver);
#ifdef SKIP_TRAMPOLINE_CODE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -5220,7 +5213,7 @@ gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
gdb_assert (gdbarch->skip_solib_resolver != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
- return gdbarch->skip_solib_resolver (pc);
+ return gdbarch->skip_solib_resolver (gdbarch, pc);
}
void
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 6901259..a9df675 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2138,15 +2138,9 @@ extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_s
evaluates non-zero, this is the address where the debugger will place
a step-resume breakpoint to get us past the dynamic linker. */
-typedef CORE_ADDR (gdbarch_skip_solib_resolver_ftype) (CORE_ADDR pc);
+typedef CORE_ADDR (gdbarch_skip_solib_resolver_ftype) (struct gdbarch *gdbarch, CORE_ADDR pc);
extern CORE_ADDR gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc);
extern void set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, gdbarch_skip_solib_resolver_ftype *skip_solib_resolver);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_SOLIB_RESOLVER)
-#error "Non multi-arch definition of SKIP_SOLIB_RESOLVER"
-#endif
-#if !defined (SKIP_SOLIB_RESOLVER)
-#define SKIP_SOLIB_RESOLVER(pc) (gdbarch_skip_solib_resolver (current_gdbarch, pc))
-#endif
/* For SVR4 shared libraries, each call goes through a small piece of
trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 29a2efa..eb015b3 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -704,7 +704,7 @@ f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generi
# 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
+m: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.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 6bc22a6..82cbb83 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2331,7 +2331,8 @@ process_event_stop_test:
if (step_over_calls == STEP_OVER_UNDEBUGGABLE
&& IN_SOLIB_DYNSYM_RESOLVE_CODE (stop_pc))
{
- CORE_ADDR pc_after_resolver = SKIP_SOLIB_RESOLVER (stop_pc);
+ CORE_ADDR pc_after_resolver =
+ gdbarch_skip_solib_resolver (current_gdbarch, stop_pc);
if (pc_after_resolver)
{