Humble Framework for SkyOS


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

Debugging


Detailed Description

The Debug module includes all classes and functions that only exist in debug builds. This includes the HDebug class, and several DEBUG_* macros. To compile the debugging code, the __DEBUG__ symbol must be defined as non-zero.


Data Structures

class  HDebug
 Provides debug logging to a text file. More...
class  HAssertion
 Exception class used to retain ASSSERT() information. More...

Defines

#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.


 

2006.01.09-16:37