how to panic FreeBSD

Chuck Swiger cswiger at mac.com
Sun Jul 30 11:39:58 UTC 2006


Only OpenSource wrote:
> I am trying to learn kernel debugging and one of the approaches I have 
> come up with is to introduce situations in the sys code by which the compiled
> kernel is buggy and will panic.

Most people introducing bugs into the kernel do so by accident, rather than 
deliberately.  Most people trying to debug the kernel use optional printf or 
kernel-logging statements (see PDEBUG, CF_DEBUG, VLOG, etc) controlled by 
things like DEBUG, WITNESS, INVARIANTS, etc.

> My query is what are the typical bugs that I can introduce in say by
> which the kernel would panic.

If you want to panic the kernel, just call panic("some reason") directly.

-- 
-Chuck


More information about the freebsd-questions mailing list