Subject: Re: Two bugs, I think
To: Donald Lee <donlee_ppc@icompute.com>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-macppc
Date: 01/23/2001 11:50:57
> I tried to get a stack trace, but "trace" command at the prompt after
> panic resulted in some pretty useless output that was all ffffff
> addresses.  Is this the kernel debugger that I hear is busted?   Can
> anyone tell me how to get a useful stack trace from this condition?

I ran into this recently.  It seems the macppc stack trace code has a
singularly useless failure mode in the absence of a ddb symbol table.
Then I did this and at least I got addresses.  (This is relative to
"$NetBSD: db_trace.c,v 1.3 1999/03/05 06:10:48 tsubai Exp $".)

--- OLD/sys/arch/powerpc/powerpc/db_trace.c	Fri Jul  9 02:38:19 1999
+++ NEW/sys/arch/powerpc/powerpc/db_trace.c	Fri Jan 19 17:23:35 2001
@@ -121,6 +121,7 @@
 		if ((caller = (db_addr_t)vtophys(lr)) == 0)
 			caller = lr;
 
+/*
 		diff = 0;
 		symname = NULL;
 		sym = db_search_symbol(caller, DB_STGY_ANY, &diff);
@@ -128,5 +129,7 @@
 		if (symname == NULL)
 			symname = "?";
 		db_printf("at %s+%x\n", symname, diff);
+*/
+		db_printf("%x\n",caller);
 	}
 }

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B