Subject: Re: howto debug kernel
To: Lian Keng Lim <kengl+@andrew.cmu.edu>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: tech-kern
Date: 05/09/1997 12:41:42
> 
> greetings,
> I'm new to kernel hacking and I was wondering if someone could help me
> out here.
> I want to debug some code I wrote as an extension to the NetBSD 1.2 kernel.
> I had intended to call syslog() in my code and check the syslog files
> much like one would use printf() statements, but when I compiled the
> kernel I was unable to link; with the compiler complaining that __syslog
> is not a defined symbol in TEXT.
> Am I missing something?
> Is there a similar feature to syslog() that I can use within kernel code?
> 
> Can anyone recommend a better way of debugging kernel code?

I'm not sure of a "better" way, but I just always use printf's. Just don't
use them in interrupt routines which might be called inside spltty()'d
code.

Take care,

Bill