Subject: Re: How to force core dump ?
To: Philip Christian <>
From: Jachym Holecek <>
List: tech-kern
Date: 01/21/2003 18:00:26
On Tue, Jan 21, 2003 at 04:42:23PM +0000, Philip Christian wrote:
> clnp_raw.c is part of the kernel, and I need the kernel to coredump at a
> specific point in its execution.  Basically I want to edit clnp_raw.c to cause
> a coredump and then recompile the kernel with the modified clnp_raw.c of if
> someone has code that just grabs the whole of memory and writes it to a
> file...  I can't find debugger in the man pages.  I need some more detailed
> help...  I saw the panic() command but couldn't get it to work, I'm just too
> stupid to figure it out.

Ok. Compile your kernel with ddb support, include opt_ddb.h (?) in the file
you want to debug and call the Debugger() function at the point you want
to have a coredump (the corresponding man page is ddb(4), this api isn't
described there. It however is described at in the kernel FAQ IIRC).
Then, from ddb, call its sync command. You will probably want to use a kernel
with full symbol table - edit the kernel config file appropriately.

	-- Jachym Holecek