lkml.org 
[lkml]   [1999]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: *(int*)0 = 0 & variations
Date
>> * a central dbg_printk().
>
>Ditto. This would be nice too. This will need to be controlled at the
>module level IMHO, maybe something like:

I thought about a macro trick:

// before including <linux/debug.h>, you define the 'dbg_printk()'
// group your file belongs to:
#define DBG_PRINTK_GRP buggy
// this creates a global variable. only if this variable is
// 1, then the dbg_printk()'s are actually printed.
// (or: 0:ignore, 1: special internal ring buffer, 2: syslog,...)
// this must be used in one file from the group.
#define DBG_PRINTK_GRP_INIT 2

#include <linux/debug.h>

advantages:
* more flexible than DEBUG_MODULE
* can be enabled at run time with a debugger.

--
Manfred





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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