Re: How to debug a kernel?

Keith Owens (kaos@ocs.com.au)
Fri, 26 Jun 1998 09:31:03 +1000


On Thu, 25 Jun 1998 14:32:05 +0200,
Martin Maciaszek <fastjack@come-on.de> wrote:
>I'm still some kind of programming newbie but this is a question that
>struck me, while debugging my own little programs. How do you kernel
>hackers debug the kernel. You can't just load it into a debugger, or can
>you?

(1) Read the source, Luke :).
(2) Stick lots of debugging statements in your code.
(3) Use modules or boot a lot.
(4) <plug> Integrated Kernel Debugging patches, for 2.1.x only. Latest
is ftp://ftp.ocs.com.au/pub/ikd-2.1.105.gz </plug>. Lets you do
some debugging on the running kernel.

*** There is no substitute for reading and understanding the source. ***

>BTW: Are there any online rousource that explain how the kerel internals
>work? I would like to understand how the kernel works but the source is
>rather big and I don't know where to start.

Kernel Hackers' Guide. http://www.redhat.com:8080. Also read
everything in the linux/Documentation directory.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu