diff options
author | John Gilmore <gnu@cygnus> | 1994-01-11 07:45:48 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1994-01-11 07:45:48 +0000 |
commit | 7b2bcbf59d9eaa5123765fcc9640b7bbd4180e4f (patch) | |
tree | 5c45602131090cccf1bb37d4b7e162b2dddc6ddb /gdb/a29k-tdep.c | |
parent | c36a1486c6b0d7f145258deb68a15ec9fa3e244f (diff) | |
download | gdb-7b2bcbf59d9eaa5123765fcc9640b7bbd4180e4f.zip gdb-7b2bcbf59d9eaa5123765fcc9640b7bbd4180e4f.tar.gz gdb-7b2bcbf59d9eaa5123765fcc9640b7bbd4180e4f.tar.bz2 |
* a29k-tdep.c (examine_prologue): Don't worry if the ASGEQ
stack overflow check isn't right after the register stack
adjustment instruction. Metaware R2.3u compiler moves other
things in front of it. This fix isn't perfect but is what's
running.
Diffstat (limited to 'gdb/a29k-tdep.c')
-rw-r--r-- | gdb/a29k-tdep.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/gdb/a29k-tdep.c b/gdb/a29k-tdep.c index 88b630a..20e9d53 100644 --- a/gdb/a29k-tdep.c +++ b/gdb/a29k-tdep.c @@ -1,5 +1,5 @@ /* Target-machine dependent code for the AMD 29000 - Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Jim Kingdon. This file is part of GDB. @@ -149,17 +149,18 @@ examine_prologue (pc, rsize, msize, mfp_used) } p += 4; - /* Next instruction must be asgeu V_SPILL,gr1,rab. + /* Next instruction ought to be asgeu V_SPILL,gr1,rab. * We don't check the vector number to allow for kernel debugging. The * kernel will use a different trap number. + * If this insn is missing, we just keep going; Metaware R2.3u compiler + * generates prologue that intermixes initializations and puts the asgeu + * way down. */ insn = read_memory_integer (p, 4); - if ((insn & 0xff00ffff) != (0x5e000100|RAB_HW_REGNUM)) + if ((insn & 0xff00ffff) == (0x5e000100|RAB_HW_REGNUM)) { - p = pc; - goto done; + p += 4; } - p += 4; /* Next instruction usually sets the frame pointer (lr1) by adding <size * 4> from gr1. However, this can (and high C does) be @@ -271,6 +272,19 @@ examine_prologue (pc, rsize, msize, mfp_used) } } + /* Next instruction might be asgeu V_SPILL,gr1,rab. + * We don't check the vector number to allow for kernel debugging. The + * kernel will use a different trap number. + * Metaware R2.3u compiler + * generates prologue that intermixes initializations and puts the asgeu + * way down after everything else. + */ + insn = read_memory_integer (p, 4); + if ((insn & 0xff00ffff) == (0x5e000100|RAB_HW_REGNUM)) + { + p += 4; + } + done: if (msymbol != NULL) { |