diff options
author | Stu Grossman <grossman@cygnus> | 1993-09-16 19:16:19 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1993-09-16 19:16:19 +0000 |
commit | f2e21136eb745bec07065e7bb95fb971b7bb5f07 (patch) | |
tree | a5375fa0da88f84c3f07475562c6551c3065f356 /gdb/sparc-stub.c | |
parent | 13998021224dd1c88142928ffa39cd94cd134f76 (diff) | |
download | gdb-f2e21136eb745bec07065e7bb95fb971b7bb5f07.zip gdb-f2e21136eb745bec07065e7bb95fb971b7bb5f07.tar.gz gdb-f2e21136eb745bec07065e7bb95fb971b7bb5f07.tar.bz2 |
* sparc-stub.c (_trap_low): Do restore/save sequence after
setting sp to ensure that we load the previous window from the
right place on the stack.
Diffstat (limited to 'gdb/sparc-stub.c')
-rw-r--r-- | gdb/sparc-stub.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/sparc-stub.c b/gdb/sparc-stub.c index 2688b42..689282a 100644 --- a/gdb/sparc-stub.c +++ b/gdb/sparc-stub.c @@ -220,9 +220,6 @@ recursive_trap: call _handle_exception add %sp, 24 * 4, %o0 ! Pass address of registers - restore ! Ensure that previous window is valid - save %g0, %g0, %g0 ! by causing a window_underflow trap - ! Reload all of the registers that aren't on the stack ld [%sp + (24 + 1) * 4], %g1 ! registers[Gx] @@ -237,6 +234,10 @@ recursive_trap: ldd [%sp + (24 + 64) * 4], %l0 ! Y & PSR ldd [%sp + (24 + 68) * 4], %l2 ! PC & NPC + + restore ! Ensure that previous window is valid + save %g0, %g0, %g0 ! by causing a window_underflow trap + mov %l0, %y mov %l1, %psr ! Make sure that traps are disabled ! for rett |