aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/alpha-linux-tdep.c3
-rw-r--r--gdb/alpha-osf1-tdep.c2
-rw-r--r--gdb/alpha-tdep.c14
-rw-r--r--gdb/alpha-tdep.h6
-rw-r--r--gdb/alphafbsd-tdep.c3
-rw-r--r--gdb/alphanbsd-tdep.c3
7 files changed, 26 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f0ee016..c6f4bcc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2004-05-01 Andrew Cagney <cagney@redhat.com>
+ * alpha-tdep.c (alpha_sigtramp_frame_sniffer): Use pc_in_sigtramp.
+ * alpha-tdep.h (struct gdbarch_tdep): Add pc_in_sigtramp.
+ * alphafbsd-tdep.c (alphafbsd_init_abi): Update.
+ * alpha-osf1-tdep.c (alpha_osf1_init_abi): Update.
+ * alpha-linux-tdep.c (alpha_linux_init_abi): Update.
+
* Makefile.in (m68klinux-nat.o): Update dependencies.
* m68klinux-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
(m68k_linux_sigtramp_frame_cache)
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index 344195e..02036ba 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -134,11 +134,10 @@ alpha_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Hook into the MDEBUG frame unwinder. */
alpha_mdebug_init_abi (info, gdbarch);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, alpha_linux_pc_in_sigtramp);
-
tdep = gdbarch_tdep (gdbarch);
tdep->dynamic_sigtramp_offset = alpha_linux_sigtramp_offset;
tdep->sigcontext_addr = alpha_linux_sigcontext_addr;
+ tdep->pc_in_sigtramp = alpha_linux_pc_in_sigtramp;
tdep->jb_pc = 2;
tdep->jb_elt_size = 8;
}
diff --git a/gdb/alpha-osf1-tdep.c b/gdb/alpha-osf1-tdep.c
index 1fc9889..b5879ad 100644
--- a/gdb/alpha-osf1-tdep.c
+++ b/gdb/alpha-osf1-tdep.c
@@ -54,13 +54,13 @@ alpha_osf1_init_abi (struct gdbarch_info info,
/* Hook into the MDEBUG frame unwinder. */
alpha_mdebug_init_abi (info, gdbarch);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, alpha_osf1_pc_in_sigtramp);
/* The next/step support via procfs on OSF1 is broken when running
on multi-processor machines. We need to use software single stepping
instead. */
set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
tdep->sigcontext_addr = alpha_osf1_sigcontext_addr;
+ tdep->pc_in_sigtramp = alpha_osf1_pc_in_sigtramp;
tdep->jb_pc = 2;
tdep->jb_elt_size = 8;
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 0f4eaa7..378b652 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -863,14 +863,20 @@ alpha_sigtramp_frame_sniffer (struct frame_info *next_frame)
CORE_ADDR pc = frame_pc_unwind (next_frame);
char *name;
- /* We shouldn't even bother to try if the OSABI didn't register
- a sigcontext_addr handler. */
- if (!gdbarch_tdep (current_gdbarch)->sigcontext_addr)
+ /* NOTE: cagney/2004-04-30: Do not copy/clone this code. Instead
+ look at tramp-frame.h and other simplier per-architecture
+ sigtramp unwinders. */
+
+ /* We shouldn't even bother to try if the OSABI didn't register a
+ sigcontext_addr handler or pc_in_sigtramp hander. */
+ if (gdbarch_tdep (current_gdbarch)->sigcontext_addr == NULL)
+ return NULL;
+ if (gdbarch_tdep (current_gdbarch)->pc_in_sigtramp == NULL)
return NULL;
/* Otherwise we should be in a signal frame. */
find_pc_partial_function (pc, &name, NULL, NULL);
- if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
+ if (gdbarch_tdep (current_gdbarch)->pc_in_sigtramp (pc, name))
return &alpha_sigtramp_frame_unwind;
return NULL;
diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h
index 828a3c6..b1b8516 100644
--- a/gdb/alpha-tdep.h
+++ b/gdb/alpha-tdep.h
@@ -83,6 +83,12 @@ struct gdbarch_tdep
the sigcontext structure for that signal handler. */
CORE_ADDR (*sigcontext_addr) (struct frame_info *);
+ /* Does the PC fall in a signal trampoline. */
+ /* NOTE: cagney/2004-04-30: Do not copy/clone this code. Instead
+ look at tramp-frame.h and other simplier per-architecture
+ sigtramp unwinders. */
+ int (*pc_in_sigtramp) (CORE_ADDR pc, char *name);
+
/* Offset of registers in `struct sigcontext'. */
int sc_pc_offset;
int sc_regs_offset;
diff --git a/gdb/alphafbsd-tdep.c b/gdb/alphafbsd-tdep.c
index 77bd6ea..661cf02 100644
--- a/gdb/alphafbsd-tdep.c
+++ b/gdb/alphafbsd-tdep.c
@@ -100,10 +100,9 @@ alphafbsd_init_abi (struct gdbarch_info info,
set_gdbarch_use_struct_convention (gdbarch, alphafbsd_use_struct_convention);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, alphafbsd_pc_in_sigtramp);
-
tdep->dynamic_sigtramp_offset = alphafbsd_sigtramp_offset;
tdep->sigcontext_addr = alphafbsd_sigcontext_addr;
+ tdep->pc_in_sigtramp = alphafbsd_pc_in_sigtramp;
tdep->sc_pc_offset = 288;
tdep->sc_regs_offset = 24;
tdep->sc_fpregs_offset = 320;
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index 24fa358..c8a441b 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -205,8 +205,6 @@ alphanbsd_init_abi (struct gdbarch_info info,
/* Hook into the MDEBUG frame unwinder. */
alpha_mdebug_init_abi (info, gdbarch);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, alphanbsd_pc_in_sigtramp);
-
/* NetBSD/alpha does not provide single step support via ptrace(2); we
must use software single-stepping. */
set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
@@ -215,6 +213,7 @@ alphanbsd_init_abi (struct gdbarch_info info,
nbsd_lp64_solib_svr4_fetch_link_map_offsets);
tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;
+ tdep->pc_in_sigtramp = alphanbsd_pc_in_sigtramp;
tdep->sigcontext_addr = alphanbsd_sigcontext_addr;
tdep->jb_pc = 2;