[lkml]   [2000]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Universal debug macros.
"Richard B. Johnson" wrote:
> On Mon, 27 Nov 2000, Andrew E. Mileski wrote:
> >
> > Reminds me ... <linux/kernel.h> has a "#if DEBUG" statement that blows
> > up if the debug code does something like "#define DEBUG(X...) printk(X...)".
> > I came across this recently (think I was debugging PCI code ... not sure).
> > Changing it to "#ifdef DEBUG" avoids problems.
> >
> > --
> > Andrew E. Mileski - Software Engineer
> >
> I find that the following works fine:
> #ifdef DEBUG
> #define DEB(f) f
> #else
> #define DEB(f)
> #endif

Agreed, but that wasn't my point. There is debug code in the current
kernel that defines DEBUG to something non-numeric, which causes
the compile to barf on kernel.h in some cases (try defining DEBUG in
your Makefile). Instances of the offending code (there are SEVERAL)
and kernel.h should be fixed.

Try this from the top level:
grep -r DEBUG * | grep -v DEBUG_ | less

Andrew E. Mileski - Software Engineer
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:47    [W:0.086 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site