summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-05-01 15:34:49 +0000
committerAndrew Cagney <cagney@redhat.com>2004-05-01 15:34:49 +0000
commitf2524b93f342c757b14cc16595e00833aaaa49b5 (patch)
treeb975a5ab4c46cb3be345643d5f0ce03df82af1d5
parent17e20bce79d64f0856cd38d3e00b56beb6fa7e8c (diff)
downloadppe42-binutils-f2524b93f342c757b14cc16595e00833aaaa49b5.tar.gz
ppe42-binutils-f2524b93f342c757b14cc16595e00833aaaa49b5.zip
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.
-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 f0ee01654d..c6f4bccc20 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 344195eee4..02036ba3a5 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 1fc988956f..b5879ad551 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 0f4eaa7611..378b652fee 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 828a3c6b2f..b1b8516bc7 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 77bd6eaac3..661cf0285e 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 24fa358b82..c8a441bb86 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;
OpenPOWER on IntegriCloud