Understanding panic and exit in the kernel
Charlie Martin
crmartin at sgi.com
Wed Sep 7 19:24:49 UTC 2011
On 2011-09-07 12:53, mdf at FreeBSD.org wrote:
>> For my immediate purposes, I'd be happy with any way in which I could
>> > brutally kill the kernel and force it to the debugger, say by replacing the
>> > panic call with a printf followed by "1/0;". But I'm a little confused by
>> > the panic.c code -- it prints the arguments using a var_args, and then calls
>> > "exit(1);'
> What file are you looking in? The kernel panic() is in
> sys/kern/kern_shutdown.c, not sys/boot/common/panic.c. It will
> optionally call kdb_enter_why() and then boot().
Bingo, that's got to help. This makes a lot more sense.
> Do you have the debug.debugger_on_panic sysctl set to 1?
Yes -- and panic does so *except* in the version with those changes to
queue.h.
> Thanks,
> matthew
>
--
Charles R. (Charlie) Martin
Senior Software Engineer
SGI logo
1900 Pike Road
Longmont, CO 80501
Phone: 303-532-0209
E-Mail: CRMartin at sgi.com <mailto:CRMartin at sgi.com>
Website: www.sgi.com <http://www.sgi.com>
More information about the freebsd-hackers
mailing list