Subject: Re: kernel debug messages
To: Berndt Josef Wulf <wulf@ping.net.au>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: tech-kern
Date: 08/18/2000 10:51:52
<wulf@ping.net.au> (Berndt Josef Wulf) writes:
> how does one enable kernel debug features, in particular for the
> ugen device?
>
> I've tried it with
>
> options DIAGNOSTIC
> options DEBUG
These two are probably not necessary for what you are doing, but
they are activated just by the option.
> options DDB
This is also right, and you'll need it..
> options USB_DEBUG
> options UGEN_DEBUG
These two, like most driver-specific debug options, enables the
inclusion of a printf that is still conditional on a driver-specific
global variable. In your case, the variables are called "usbdebug" and
"ugendebug" (easily found in the driver sources).
To enable the messages, you need to get into the ddb before whatever
it is you want to debug (possibly at boot time, with boot -d), and
enter:
w/l usbdebug 1
w/l ugendebug 1
And then the drivers will start printing these debug messages.
Some of the debug messages depend on the value of the variable to set
the verbosity of the debugging messages; looking at the source at the
calls to DPRINTFN will show this. If you want to see those, you'll
need to set the variables to some higher value.
- Nathan