fix for undefined symbol 'panic'

Harti Brandt brandt at fokus.fraunhofer.de
Mon Jan 26 02:17:26 PST 2004


Looks good to me.

harti

On Mon, 26 Jan 2004, Ken Smith wrote:

KS>On Sun, Jan 25, 2004 at 05:45:29PM +0100, Harti Brandt wrote:
KS>
KS>> Go ahead. I think the arguments are passed in %o0, %o1 and %o2. I don't
KS>> know in what order, however.
KS>
KS>Thanks.  I think this is it.  With this in place the kernel compiles.
KS>I checked it by placing a bogus use of the macro into
KS>sys/sparc64/sparc64/swtch.S and the resulting panic message was:
KS>
KS>panic: Test call to panic
KS>at line 0 in file (null)
KS>cpuid = 0;
KS>Debugger("panic")
KS>Stopped at      Debugger+0x1c:  ta              %xcc, 1
KS>db>
KS>
KS>I don't hold much hope of getting the line number and filename right
KS>(and I think you get the same results from the places the i386 assembly
KS>code calls the new __panic, sys/i386/i386/swtch.s).
KS>
KS>I sent this in to my mentor for approval, but if anyone sees anything
KS>wrong with it let me know.
KS>
KS>Thanks.
KS>
KS>Index: asmacros.h
KS>===================================================================
KS>RCS file: /home/ncvs/src/sys/sparc64/include/asmacros.h,v
KS>retrieving revision 1.17
KS>diff -u -r1.17 asmacros.h
KS>--- asmacros.h	16 Jul 2003 00:08:43 -0000	1.17
KS>+++ asmacros.h	26 Jan 2004 04:52:24 -0000
KS>@@ -101,8 +101,10 @@
KS> 	.sect	.rodata ; \
KS> 9:	.asciz	msg ; \
KS> 	.previous ; \
KS>-	SET(9b, r1, %o0) ; \
KS>-	call	panic ; \
KS>+	SET(9b, r1, %o2) ; \
KS>+	clr	%o1 ; \
KS>+	clr	%o0 ; \
KS>+	call	__panic ; \
KS> 	 nop
KS>
KS> #ifdef INVARIANTS
KS>
KS>
KS>

-- 
harti brandt,
http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private
brandt at fokus.fraunhofer.de, harti at freebsd.org


More information about the freebsd-sparc64 mailing list