Index: kern/kern_shutdown.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_shutdown.c,v retrieving revision 1.178 diff -c -r1.178 kern_shutdown.c *** kern/kern_shutdown.c 10 Apr 2006 10:03:40 -0000 1.178 --- kern/kern_shutdown.c 15 Aug 2006 15:40:34 -0000 *************** *** 237,242 **** --- 237,244 ---- return; } + if (panicstr == NULL) + panicstr = "<NULL>"; /* The lock manager relies on this being set */ savectx(&dumppcb); dumptid = curthread->td_tid; dumping++; *************** *** 489,494 **** --- 491,499 ---- static u_int panic_cpu = NOCPU; #endif + static struct thread *panic_td = NULL; + static pid_t panic_pid; + /* * Panic is called on unresolvable fatal errors. It prints "panic: mesg", * and then reboots. If we are called twice, then we avoid trying to sync *************** *** 517,522 **** --- 522,532 ---- while (panic_cpu != NOCPU) ; /* nothing */ #endif + if (panic_td == NULL) { + /* Preserve first panic td & pid */ + panic_td = curthread; + panic_pid = curthread->td_proc->p_pid; + } bootopt = RB_AUTOBOOT | RB_DUMP; newpanic = 0; $ cat /usr/src/sys/i386/conf/PHO # # PHO -- Generic kernel configuration file for FreeBSD/i386 # Use this for multi-processor machines # include GENERIC ident PHO-GENERIC options BREAK_TO_DEBUGGER options SW_WATCHDOG