diff options
author | Michael Brown <mcb30@ipxe.org> | 2016-07-05 10:10:35 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2016-07-05 10:27:22 +0100 |
commit | e2c0a20d60cac7e29f8aa6ed8231338eb34e9736 (patch) | |
tree | 26f8d1b51b52f50e023a7b61b30a98d41844dd13 /src/Makefile.housekeeping | |
parent | 55f7a675d61f8b83478e71d4f9efb3a1b789eb08 (diff) | |
download | ipxe-e2c0a20d60cac7e29f8aa6ed8231338eb34e9736.tar.gz |
[debug] Allow per-object runtime enabling/disabling of debug messages
The DBG_ENABLE() and DBG_DISABLE() macros currently affect the debug
level of all objects that were built with debugging enabled. This is
undesirable, since it is common to use different debug levels in each
object.
Make the debug level mask a per-object variable. DBG_ENABLE() and
DBG_DISABLE() now control only the debug level for the containing
object (which is consistent with the intended usage across the
existing codebase). DBG_ENABLE_OBJECT() and DBG_DISABLE_OBJECT() may
be used to control the debug level for a specified object. For
example:
// Enable DBG() messages from tcpip.c
DBG_ENABLE_OBJECT ( tcpip, DBGLVL_LOG );
Note that the existence of debug messages continues to be gated by the
DEBUG=... list specified on the build command line. If an object was
built without the relevant debug level, then DBG_ENABLE_OBJECT() will
have no effect on that object at runtime (other than to explicitly
drag in the object via a symbol reference).
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/Makefile.housekeeping')
0 files changed, 0 insertions, 0 deletions