Humble Framework for SkyOS


Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

HDebug.h File Reference


Detailed Description

The HDebug.h header file contains the HDebug class, as well as several debug-specific macros.

Warning:
HDebug.h must be included before HError.h, and as such, cannot use any of the Humble Framework error codes or macros.

Definition in file HDebug.h.

Go to the source code of this file.

Defines

#define SEND_TO_STDERR   1
#define SEND_TO_PRINTD   0
#define ASSERT(x)   if (x) ; else throw HAssertion(#x,__FILE__,__LINE__)
 Throw an HAssertion if an expression evaluates to false.
#define ASSERT_HND(h)   if (GOOD_HND(h)) ; else throw HAssertion(#h " is NULL",__FILE__,__LINE__)
 Throw an HAssertion if an NULL handle is detected.
#define ASSERT_PTR(p)   if (GOOD_PTR(p)) ; else throw HAssertion(#p " is NULL",__FILE__,__LINE__)
 Throw an HAssertion if an NULL ptr is detected.
#define ASSERT_STR(s)   if (STR_VALID(s)) ; else throw HAssertion(#s " is invalid",__FILE__,__LINE__)
 Throw an HAssertion if an invalid string is detected.
#define DEBUG_CHECK(x)   HDebug::Check((x),#x,__FILE__,__LINE__)
 Lets user override an assertion.
#define DEBUG_LOG   HDebug::GetLog().LogV
 Logs a printf() style message to the debug log file.
#define DEBUG_HEX(p, u)   HDebug::GetLog().LogHex((p),(u))
 Logs a hex dump of bytes to the debug log file.
#define DEBUG_MSG(x, w, p)   HDebug::GetLog().LogMsg((x),(w),(p))
 Logs a SkyGI message (s_gi_msg) to the debug log file.
#define DEBUG_ONLY(x)   x
 Includes an arbitrary piece of code in only debug builds.