Subject: Re: Kernal panic woes
To: Christos Zoulas <christos@zoulas.com>
From: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
List: port-i386
Date: 10/09/1998 13:13:58
> In the morning you can:
>
> sysctl -w ddb.onpanic=1
>
> and just before you leave you can:
>
> sysctl -w ddb.onpanic=0
Nice theory, but the problem is that ddb is entered differently from a
trap as opposed to a direct panic call, and ddb.onpanic only affects
what happens after panic() is called; if you look in the code for
trap() in sys/arch/i386/i386/trap.c, you'll find:
#ifdef DDB
if (kdb_trap(type, 0, &frame))
return;
#endif
if (frame.tf_trapno < trap_types)
printf("fatal %s", trap_type[frame.tf_trapno]);
else
printf("unknown trap %d", frame.tf_trapno);
printf(" in %s mode\n", (type & T_USER) ? "user" : "supervisor");
printf("trap type %d code %x eip %x cs %x eflags %x cr2 %x cpl %x\n",
type, frame.tf_err, frame.tf_eip, frame.tf_cs, frame.tf_eflags, rcr2(), cpl);
traptopcb(&frame, &trappcb);
panic("trap");
If you've built with DDB, you never *get* to the panic call...
- Bill