Sorry; re-fixed Debug_Stack_Trace again.
authorMatt Birkholz <matt@birkholz.chandler.az.us>
Sun, 26 Feb 2012 17:14:28 +0000 (10:14 -0700)
committerMatt Birkholz <matt@birkholz.chandler.az.us>
Sun, 26 Feb 2012 17:14:28 +0000 (10:14 -0700)
The 20 year old code lies!  STACK_LOC(0) *is* the top-of-stack.
(Free[0] is not a valid object, but that is a different register.)
So... the stack slot address must be printed *before* the _POP.
I tried to pop the last commit, but apparently we have
receive.denyNonFastForwards at Savannah.

src/microcode/debug.c

index c727300149a0ab5e0642df758c55ffb7ffc6b60f..8838cc2c347a26014eb08719f5cc8bf07e3a8088 100644 (file)
@@ -685,8 +685,8 @@ Back_Trace (outf_channel stream)
          break;
        }
 #endif
-      Temp = (STACK_POP ());
       outf (stream, "{%#lx}", ((unsigned long) stack_pointer));
+      Temp = (STACK_POP ());
       if (RETURN_CODE_P (Temp))
        {
          if (print_one_continuation_frame (stream, Temp))