2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS user32.dll
4 * FILE: include/debug.h
5 * PURPOSE: Debugging support macros
6 * DEFINES: DBG - Enable debug output
7 * NASSERT - Disable assertions
12 #define NORMAL_MASK 0x000000FF
13 #define SPECIAL_MASK 0xFFFFFF00
14 #define MIN_TRACE 0x00000001
15 #define MID_TRACE 0x00000002
16 #define MAX_TRACE 0x00000003
18 #define DEBUG_CHECK 0x00000100
19 #define DEBUG_OBJECT 0x00000200
20 #define DEBUG_WINDOW 0x00000400
21 #define DEBUG_ULTRA 0xFFFFFFFF
25 extern DWORD DebugTraceLevel
;
28 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
29 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
30 DbgPrint("(%hS:%d)(%hS) ", __FILE__, __LINE__, __FUNCTION__); \
41 #define ASSERT(x) if (!(x)) { D(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); KeBugCheck(0); }
44 #define ASSERT_IRQL(x) ASSERT(KeGetCurrentIrql() <= (x))
50 #define ASSERT_IRQL(x)
56 #define assert(x) ASSERT(x)
57 #define assert_irql(x) ASSERT_IRQL(x)
60 #define UNIMPLEMENTED \
61 D(MIN_TRACE, ("is unimplemented, please try again later.\n"));
64 D(DEBUG_CHECK, ("\n"));
68 #endif /* __DEBUG_H */