From 7bec77b47df60bd8242a51b3661c78eb596d40e8 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Tue, 1 Feb 1994 22:17:29 +0000 Subject: [PATCH] * config/m88k/{tm-delta88.h,tm-delta88v4.h}, m88k-tdep.c: Define IN_SIGTRAMP and backtrace correctly through signal handlers. --- gdb/ChangeLog | 5 +++++ gdb/config/m88k/tm-delta88.h | 4 ++++ gdb/config/m88k/tm-delta88v4.h | 4 ++++ gdb/m88k-tdep.c | 8 ++++++++ 4 files changed, 21 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6206f63..25f69ad 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 1 17:13:32 1994 Kevin Buettner (kev@cujo.geg.mot.com) + + * config/m88k/{tm-delta88.h,tm-delta88v4.h}, m88k-tdep.c: + Define IN_SIGTRAMP and backtrace correctly through signal handlers. + Tue Feb 1 22:13:25 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * procfs.c (wait_fd): Handle EINTR error return from PIOCWSTOP ioctl diff --git a/gdb/config/m88k/tm-delta88.h b/gdb/config/m88k/tm-delta88.h index 7ca46dd..f0c4d29 100644 --- a/gdb/config/m88k/tm-delta88.h +++ b/gdb/config/m88k/tm-delta88.h @@ -20,3 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m88k/tm-m88k.h" #define DELTA88 + +#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", (name))) +#define SIGTRAMP_FRAME_FIXUP(frame) (frame) += 0x20 +#define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp), 4) diff --git a/gdb/config/m88k/tm-delta88v4.h b/gdb/config/m88k/tm-delta88v4.h index 129b842..78c9e2d 100644 --- a/gdb/config/m88k/tm-delta88v4.h +++ b/gdb/config/m88k/tm-delta88v4.h @@ -24,3 +24,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* If we don't define this, backtraces go on forever. */ #define FRAME_CHAIN_VALID_ALTERNATE 1 + +#define IN_SIGTRAMP(pc, name) ((name) && (STREQ ("signalhandler", (name)) \ + || STREQ("sigacthandler", (name)))) +#define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp)+0xcd8, 4) diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c index a932e4c..189db6f 100644 --- a/gdb/m88k-tdep.c +++ b/gdb/m88k-tdep.c @@ -480,7 +480,15 @@ frame_find_saved_regs (fi, fsr) limit = (sal.end && sal.end < fi->pc) ? sal.end: fi->pc; /* This will fill in fields in *fi as well as in cache_fsr. */ +#ifdef SIGTRAMP_FRAME_FIXUP + if (fi->signal_handler_caller) + SIGTRAMP_FRAME_FIXUP(fi->frame); +#endif examine_prologue (ip, limit, fi->frame, cache_fsr, fi); +#ifdef SIGTRAMP_SP_FIXUP + if (fi->signal_handler_caller && fi->fsr->regs[SP_REGNUM]) + SIGTRAMP_SP_FIXUP(fi->fsr->regs[SP_REGNUM]); +#endif } if (fsr) -- 2.7.4