2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS WinSock 2 DLL
4 * FILE: include/debug.h
5 * PURPOSE: Debugging support macros
6 * DEFINES: DBG - Enable debug output
7 * NASSERT - Disable assertions
13 #define NORMAL_MASK 0x000000FF
14 #define SPECIAL_MASK 0xFFFFFF00
15 #define MIN_TRACE 0x00000001
16 #define MID_TRACE 0x00000002
17 #define MAX_TRACE 0x00000003
19 #define DEBUG_CHECK 0x00000100
20 #define DEBUG_ULTRA 0xFFFFFFFF
28 extern DWORD DebugTraceLevel
;
30 #define WS_DbgPrint(_t_, _x_) \
31 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
32 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
33 DbgPrint("(%hS:%d)(%hS) ", __FILE__, __LINE__, __FUNCTION__); \
40 #define ASSERT(x) if (!(x)) { WS_DbgPrint(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); ExitProcess(0); }
45 #define WS_DbgPrint(_t_, _x_)
47 #define ASSERT_IRQL(x)
53 #define assert(x) ASSERT(x)
54 #define assert_irql(x) ASSERT_IRQL(x)
57 #define UNIMPLEMENTED \
58 WS_DbgPrint(MIN_TRACE, ("is unimplemented, please try again later.\n"));
61 WS_DbgPrint(DEBUG_CHECK, ("\n"));
65 #endif /* __DEBUG_H */