diff options
author | Michael Brown | 2014-04-28 15:43:19 +0200 |
---|---|---|
committer | Michael Brown | 2014-04-28 15:45:47 +0200 |
commit | 4413ab4f5acbeba9a42f9567a687ffc5661ae190 (patch) | |
tree | 716d32a814cbc8302926769d0e4ad4e69767ba03 /src/include/compiler.h | |
parent | [downloader] Profile receive datapath (diff) | |
download | ipxe-4413ab4f5acbeba9a42f9567a687ffc5661ae190.tar.gz ipxe-4413ab4f5acbeba9a42f9567a687ffc5661ae190.tar.xz ipxe-4413ab4f5acbeba9a42f9567a687ffc5661ae190.zip |
[build] Allow for a debug level of zero
Allow for an explicit debug level of zero, which will enable
assertions and profiling (i.e. anything controlled by NDEBUG) without
generating any debug messages.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/compiler.h')
-rw-r--r-- | src/include/compiler.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h index 132793b5..3f5c913a 100644 --- a/src/include/compiler.h +++ b/src/include/compiler.h @@ -250,16 +250,9 @@ REQUEST_EXPANDED ( CONFIG_SYMBOL ); * */ -/* - * If debug_OBJECT is set to a true value, the macro DBG(...) will - * expand to printf(...) when compiling OBJECT, and the symbol - * DEBUG_LEVEL will be inserted into the object file. - * - */ -#define DEBUG_SYMBOL PREFIX_OBJECT ( debug_ ) - -#if DEBUG_SYMBOL == 0 +#ifndef DBGLVL_MAX #define NDEBUG +#define DBGLVL_MAX 0 #endif #ifndef ASSEMBLY @@ -276,12 +269,6 @@ extern void dbg_md5_da ( unsigned long dispaddr, extern void dbg_pause ( void ); extern void dbg_more ( void ); -#if DEBUG_SYMBOL -#define DBGLVL_MAX DEBUG_SYMBOL -#else -#define DBGLVL_MAX 0 -#endif - /* Allow for selective disabling of enabled debug levels */ #if DBGLVL_MAX int __debug_disable; |