Messages in this thread | | | Date | Sun, 28 Oct 2007 16:15:15 +0100 | From | Roel Kluin <> | Subject | Debugging 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/
| |