From f315dce2c64b7beac0f0b22e791ced37f454ebfb Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sun, 26 Nov 2006 22:16:29 +0000 Subject: [PATCH] 0.9.18.73: fix undefined function backtraces on PPC * 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 | 17 +++++++++++++++-- version.lisp-expr | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/runtime/ppc-assem.S b/src/runtime/ppc-assem.S index 10f46d5..4c00459 100644 --- a/src/runtime/ppc-assem.S +++ b/src/runtime/ppc-assem.S @@ -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 diff --git a/version.lisp-expr b/version.lisp-expr index 9d021f1..2f4f989 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4