Date: Wed, 7 Sep 2011 13:24:22 -0600 From: Charlie Martin <crmartin@sgi.com> To: <mdf@FreeBSD.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Understanding panic and exit in the kernel Message-ID: <4E67C4E6.40009@sgi.com> In-Reply-To: <CAMBSHm98=FykYxuWKEEvwA5fZsiDiUTtbCYhGEMig_gfyOa5cg@mail.gmail.com> References: <4E67B323.8000602@sgi.com> <CAMBSHm98=FykYxuWKEEvwA5fZsiDiUTtbCYhGEMig_gfyOa5cg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2011-09-07 12:53, mdf@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@sgi.com <mailto:CRMartin@sgi.com> Website: www.sgi.com <http://www.sgi.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E67C4E6.40009>