Subject: Re: kernel debugger
To: Steven Grunza <>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: tech-kern
Date: 03/14/2000 15:35:50
Steven Grunza <> writes:

> Of course, if there is something mapped to address 0, this won't work.  Is
> there a better way to call ddb?

Yes. There's a function, Debugger(), which will invoke ddb. The right
way to use it when you need to drop into the debugger is something

#include "opt_ddb.h"


#ifdef DDB

You could also break into ddb early and set a breakpoint before your
code runs.

If this is a "can't happen" kind of condition, rather than a temporary
debugging aid, you should probably call panic() instead, since that
will work whether or not DDB is compiled in, and will cause the right
thing to happen either way (panic/crash dump for post-mortem, or
dropping into the debugger).

        - Nathan