lkml.org 
[lkml]   [2007]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectDebugging activated during runtime
Wouldn't it be nice to be able to specify upon loading, or during runtime
to modules whether debug messages should be printed?
- No kernel recompile needed for debugging.
- Less *_DEBUG options required in menuconfig.

How I think this could work:
Add to the module struct a bool to denote debugging state. If set, pr_debug
forwards messages to printk.

Another advantage:
- A module could be loaded after an unexpected conditions (e.g. after a BUG_ON).

Caveats I can see right now:
- For modules often loaded during boot this may not be a good solution.

Alternatively, instead of a bool for the debug state, the module struct could
also get a log-level flag: messages below that level won't be printed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-28 16:17    [W:0.035 / U:0.460 seconds]
©2003-2014 Jasper Spaans. Advertise on this site