diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1994-01-31 16:23:48 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1994-01-31 16:23:48 +0000 |
commit | 0434c1a0c91e92d7a73affd5332583266b20b158 (patch) | |
tree | e6509bf78c79b55724eebb62b0ce285b6f64fc2a /gdb/mips-tdep.c | |
parent | ede7bc1c605459a09542b86b7d4b3294721a05ff (diff) | |
download | gdb-0434c1a0c91e92d7a73affd5332583266b20b158.zip gdb-0434c1a0c91e92d7a73affd5332583266b20b158.tar.gz gdb-0434c1a0c91e92d7a73affd5332583266b20b158.tar.bz2 |
* mdebugread.c (parse_procedure): Remove _sigtramp kludges for
alpha and irix. The _sigtramp case has to be handled properly
in the tdep files if we have no ecoff debugging info.
* alpha-tdep.c (alpha_frame_saved_pc, alpha_frame_chain),
mips-tdep.c (mips_frame_saved_pc): Handle signal handler frames
without PC_REGNUM kludge.
* mdebugread.c (fixup_sigtramp), mips-tdep.c (read_next_frame_reg):
Clean up handling of mips sigtramp frames, improve comments.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index f8a2732..2bc9a03 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -1,5 +1,6 @@ /* Target-dependent code for the MIPS architecture, for GDB, the GNU Debugger. - Copyright 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994 + Free Software Foundation, Inc. Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin. @@ -76,19 +77,21 @@ read_next_frame_reg(fi, regno) int regno; { /* If it is the frame for sigtramp we have a complete sigcontext - immediately below the frame and we get the saved registers from there. + somewhere above the frame and we get the saved registers from there. If the stack layout for sigtramp changes we might have to change these constants and the companion fixup_sigtramp in mdebugread.c */ #ifndef SIGFRAME_BASE -#define SIGFRAME_BASE 0x12c /* sizeof(sigcontext) */ -#define SIGFRAME_PC_OFF (-SIGFRAME_BASE + 2 * 4) -#define SIGFRAME_REGSAVE_OFF (-SIGFRAME_BASE + 3 * 4) +/* To satisfy alignment restrictions the sigcontext is located 4 bytes + above the sigtramp frame. */ +#define SIGFRAME_BASE 4 +#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * 4) +#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 3 * 4) #endif #ifndef SIGFRAME_REG_SIZE #define SIGFRAME_REG_SIZE 4 #endif for (; fi; fi = fi->next) - if (in_sigtramp(fi->pc, 0)) { + if (fi->signal_handler_caller) { int offset; if (regno == PC_REGNUM) offset = SIGFRAME_PC_OFF; else if (regno < 32) offset = (SIGFRAME_REGSAVE_OFF @@ -107,7 +110,10 @@ mips_frame_saved_pc(frame) FRAME frame; { mips_extra_func_info_t proc_desc = frame->proc_desc; - int pcreg = proc_desc ? PROC_PC_REG(proc_desc) : RA_REGNUM; + /* We have to get the saved pc from the sigcontext + if it is a signal handler frame. */ + int pcreg = frame->signal_handler_caller ? PC_REGNUM + : (proc_desc ? PROC_PC_REG(proc_desc) : RA_REGNUM); if (proc_desc && PROC_DESC_IS_DUMMY(proc_desc)) return read_memory_integer(frame->frame - 4, 4); |