Debugging activated during runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux