aboutsummaryrefslogtreecommitdiff
path: root/gdb/mipsread.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1993-05-22 10:34:47 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1993-05-22 10:34:47 +0000
commit7cf92dd25051c98177125018cf3d74f2750e5cfe (patch)
tree27e9be70ec60b6e3c52ec1fa6195986f2013ba82 /gdb/mipsread.c
parent101b7f9ca5a7f40394e739e8745b1fcaeee96709 (diff)
downloadfsf-binutils-gdb-7cf92dd25051c98177125018cf3d74f2750e5cfe.zip
fsf-binutils-gdb-7cf92dd25051c98177125018cf3d74f2750e5cfe.tar.gz
fsf-binutils-gdb-7cf92dd25051c98177125018cf3d74f2750e5cfe.tar.bz2
Fix stack unwinding through _sigtramp on Irix. These patches are from
Paul Flinders <ptf@delcam.co.uk>. * mipsread.c (fixup_sigtramp): Find _sigtramp on Irix even when the executable uses sigvec. * mips-tdep.c (read_next_frame_reg): Allow tm-file to override sigcontext offsets. * config/mips/tm-irix3.h: Add sigcontext offsets for Irix.
Diffstat (limited to 'gdb/mipsread.c')
-rw-r--r--gdb/mipsread.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index 039f3a4..294f923 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -3153,19 +3153,20 @@ fixup_sigtramp ()
sigtramp_address = -1;
- /* We know it is sold as sigvec */
+ /* We have to handle the following cases here:
+ a) The Mips library has a sigtramp label within sigvec.
+ b) Irix has a _sigtramp which we want to use, but it also has sigvec. */
s = lookup_symbol ("sigvec", 0, VAR_NAMESPACE, 0, NULL);
-
- /* Most programs do not play with signals */
- if (s == 0)
- s = lookup_symbol ("_sigtramp", 0, VAR_NAMESPACE, 0, NULL);
- else
+ if (s != 0)
{
b0 = SYMBOL_BLOCK_VALUE (s);
-
- /* A label of sigvec, to be more precise */
s = lookup_symbol ("sigtramp", b0, VAR_NAMESPACE, 0, NULL);
}
+ if (s == 0)
+ {
+ /* No sigvec or no sigtramp inside sigvec, try _sigtramp. */
+ s = lookup_symbol ("_sigtramp", 0, VAR_NAMESPACE, 0, NULL);
+ }
/* But maybe this program uses its own version of sigvec */
if (s == 0)