0.9.18.73: fix undefined function backtraces on PPC
authorNikodemus Siivola <nikodemus@random-state.net>
Sun, 26 Nov 2006 22:16:29 +0000 (22:16 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sun, 26 Nov 2006 22:16:29 +0000 (22:16 +0000)
 * undefined_tramp needs to set reg_CODE, and must have an object
   header. This was a regression as of 0.9.17.8. Current code adapted
   from MIPS, as I don't understand how the old magic header was
   supposed to work.

src/runtime/ppc-assem.S
version.lisp-expr

index 10f46d5..4c00459 100644 (file)
@@ -516,11 +516,24 @@ lra:
 
        GFUNCDEF(xundefined_tramp)
        .globl CSYMBOL(undefined_tramp)
-CSYMBOL(undefined_tramp):      
+       .long   SIMPLE_FUN_HEADER_WIDETAG                         /* header */
+       .long   CSYMBOL(undefined_tramp) - SIMPLE_FUN_CODE_OFFSET /* self */
+       .long   NIL                                               /* next */
+       .long   NIL                                               /* name */
+       .long   NIL                                               /* arglist */
+       .long   NIL                                               /* type */
+CSYMBOL(undefined_tramp):
+       /* Point reg_CODE to the header and tag it as function, since
+          the debugger regards a function pointer in reg_CODE which
+          doesn't point to a code object as undefined function.  */
+       bcl 20,31,.+4                  /* get address of the next instruction */
+       mflr reg_CODE                  /* header is 7 words back from here */
+       addi reg_CODE,reg_CODE,-7*4+FUN_POINTER_LOWTAG
+       
        twllei reg_ZERO,trap_Cerror
        .byte 4
        .byte UNDEFINED_FUN_ERROR
-       .byte 254, sc_DescriptorReg+0x40, 1     /* 140?  sparc says sc_descriptorReg */
+       .byte 254, sc_DescriptorReg+0x40, 1 /* 140?  sparc says sc_descriptorReg */
        /* This stuff is for the continuable error.  I don't think there's
         * any support for it on the lisp side */
        .align 2
index 9d021f1..2f4f989 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.18.72"
+"0.9.18.73"