From 4fea918e34d39bcca931fa5a35552e0e351ebc7e Mon Sep 17 00:00:00 2001 From: gwr Date: Wed, 14 Jan 1998 18:51:06 +0000 Subject: [PATCH] For completeness, fix the SunOS/sun3 sigtramp support too. (I had to change tm-m68k.h which affects tm-sun3.h also.) --- gnu/dist/gdb/config/m68k/tm-sun3.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gnu/dist/gdb/config/m68k/tm-sun3.h b/gnu/dist/gdb/config/m68k/tm-sun3.h index 7cd1208e07b8..251ad376362a 100644 --- a/gnu/dist/gdb/config/m68k/tm-sun3.h +++ b/gnu/dist/gdb/config/m68k/tm-sun3.h @@ -84,6 +84,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* The code which tries to deal with this bug is never harmful on a sun3. */ #define SUN_FIXED_LBRAC_BUG (0) +/* Offset to saved PC in sigcontext, from . */ +#define SIGCONTEXT_PC_OFFSET 12 + +/* The common sigtramp_saved_pc() works fine, but if you insist, + the following is how to do the old SIG_PC_FP_OFFSET hack. */ + +#if 0 /* XXX */ /* On the sun3 the kernel pushes a sigcontext on the user stack and then `calls' _sigtramp in user code. _sigtramp saves the floating point status on the stack and calls the signal handler function. The stack does not @@ -99,8 +106,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Please note that it is impossible to correctly backtrace from a breakpoint in _sigtramp as _sigtramp modifies the stack pointer a few times. */ -#undef SIG_PC_FP_OFFSET #define SIG_PC_FP_OFFSET 324 #define SIG_SP_FP_OFFSET 332 +#undef FRAME_SAVED_PC +#define FRAME_SAVED_PC(FRAME) \ + ((FRAME)->signal_handler_caller \ + ? m68k_sigtramp_saved_pc (FRAME) \ + : read_memory_integer ((FRAME)->frame + 4, 4)) + +extern CORE_ADDR m68k_sigtramp_saved_pc PARAMS ((struct frame_info *)); +#endif /* XXX */ + #endif /* TM_SUN3_H */