From: Stu Grossman Date: Thu, 16 Sep 1993 19:16:19 +0000 (+0000) Subject: * sparc-stub.c (_trap_low): Do restore/save sequence after X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2e21136eb745bec07065e7bb95fb971b7bb5f07;p=binutils-gdb.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 004cf589caf..a452fd76dd4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +Thu Sep 16 12:12:59 1993 Stu Grossman (grossman at cygnus.com) + + * 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. + Thu Sep 16 00:36:32 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * mipsread.c: Many changes for alpha ecoff format: diff --git a/gdb/sparc-stub.c b/gdb/sparc-stub.c index 2688b4263f5..689282addf9 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