Subject: Re: howto debug kernel
To: Lian Keng Lim <firstname.lastname@example.org>
From: Jeremy Cooper <email@example.com>
Date: 05/09/1997 14:09:51
On Fri, 9 May 1997, Lian Keng Lim wrote:
> 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.
Use printf() - that's what it's for. There is no 'syslog' inside the
kernel. When you issue a printf() the text you print is sent to the
message buffer inside the kernel. The user process 'syslogd' monitors
this buffer via the /dev/klog device and takes action when it sees
something new. These events are logged as the facility and
priority of kern.crit by default.