Subject: Re: Moving ATADEBUG to kernel config file ?
To: Arnaud Lacombe <lists-netbsd@sigfpe.info>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 03/28/2006 14:20:46
On Tue, Mar 28, 2006 at 01:56:36AM +0200, Arnaud Lacombe wrote:
> Hi,
>
> During the last month I debugged things related to ATA and wdc drivers
> (not bug, but just to understand how they were working). I noticed that
> ATADEBUG macro was defined in 6 different files and always turned on.
> Undefining this macro causes the compilation to fails.
>
> Wouldn't it be better to define this macro in only one place (ie. the
> kernel config file) ?
>
> BTW, I also noticed that there are a lot of sub-option which
> enable/disable, change the behaviour of debug output (such as
> atadebug_mask and wdcdebug_wd_mask, but also pcmcia_verbose,
> pcmciacis_debug ...). Unless error of my part, there is no easy access
> interface for enabling/disabling them from userland without breaking
> into DDB or change it at compilation time.
You can change them with gdb --write and reboot (or use boot -d and
patch it from ddb). Most of the time the usefull messages are printed
before the kernel reaches single-user anyway ...
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--