summaryrefslogtreecommitdiff
path: root/gdb/alpha-tdep.c
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-04-26 07:05:35 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-04-26 07:05:35 +0000
commit5868c862e2d178996aa66bf3553a6f59d1516e2e (patch)
tree97e07909585ce1ef25f0d67967be24a860bc5f98 /gdb/alpha-tdep.c
parentfd55a5dffb1d01e996ee08190487983ff4d974aa (diff)
downloadbinutils-gdb-5868c862e2d178996aa66bf3553a6f59d1516e2e.tar.gz
* alpha-tdep.h (gdbarch_tdep): Add sigcontext_addr member.
* alpha-tdep.c (alpha_sigcontext_addr): New function. (alpha_find_saved_regs): Use alpha_sigcontext_addr. (alpha_gdbarch_init): Initialize tdep->sigcontext_addr. * alpha-linux-tdep.c: Include frame.h. (alpha_linux_sigcontext_addr): New function. (alpha_linux_init_abi): Set tdep->sigcontext_addr to alpha_linux_sigcontext_addr. * alpha-osf1-tdep.c: Include gdbcore.h. (alpha_osf1_sigcontext_addr): New function. (alpha_osf1_init_abi): Set tdep->sigcontext_addr to alpha_osf1_sigcontext_addr. * config/alpha/tm-alpha.h (SIGCONTEXT_ADDR): Remove. * config/alpha/tm-alphalinux.h (SIGCONTEXT_ADDR): Remove.
Diffstat (limited to 'gdb/alpha-tdep.c')
-rw-r--r--gdb/alpha-tdep.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 6145e91f2db..6f5209782fa 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -344,6 +344,17 @@ alpha_register_virtual_size (int regno)
}
+static CORE_ADDR
+alpha_sigcontext_addr (struct frame_info *fi)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ if (tdep->sigcontext_addr)
+ return (tdep->sigcontext_addr (fi));
+
+ return (0);
+}
+
/* Guaranteed to set frame->saved_regs to some values (it never leaves it
NULL). */
@@ -372,7 +383,12 @@ alpha_find_saved_regs (struct frame_info *frame)
{
CORE_ADDR sigcontext_addr;
- sigcontext_addr = SIGCONTEXT_ADDR (frame);
+ sigcontext_addr = alpha_sigcontext_addr (frame);
+ if (sigcontext_addr == 0)
+ {
+ /* Don't know where the sigcontext is; just bail. */
+ return;
+ }
for (ireg = 0; ireg < 32; ireg++)
{
reg_position = sigcontext_addr + SIGFRAME_REGSAVE_OFF + ireg * 8;
@@ -1997,6 +2013,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->dynamic_sigtramp_offset = NULL;
tdep->skip_sigtramp_frame = NULL;
+ tdep->sigcontext_addr = NULL;
tdep->jb_pc = -1; /* longjmp support not enabled by default */