2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Novell Eagle 2000 driver
4 * FILE: include/debug.h
5 * PURPOSE: Debugging support macros
6 * DEFINES: DBG - Enable debug output
7 * NASSERT - Disable assertions
15 #define NORMAL_MASK 0x000000FF
16 #define SPECIAL_MASK 0xFFFFFF00
17 #define MIN_TRACE 0x00000001
18 #define MID_TRACE 0x00000002
19 #define MAX_TRACE 0x00000003
21 #define DEBUG_MEMORY 0x00000100
22 #define DEBUG_ULTRA 0xFFFFFFFF
26 extern ULONG DebugTraceLevel
;
30 #define NDIS_DbgPrint(_t_, _x_) \
31 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
32 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
33 DbgPrint("(%s:%d) ", __FILE__, __LINE__); \
39 #define NDIS_DbgPrint(_t_, _x_) \
40 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
41 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
42 DbgPrint("(%s:%d)(%s) ", __FILE__, __LINE__, __FUNCTION__); \
56 #define ASSERT(x) if (!(x)) { NDIS_DbgPrint(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); KeBugCheck(0); }
59 #define ASSERT_IRQL(x) ASSERT(KeGetCurrentIrql() <= (x))
63 #define NDIS_DbgPrint(_t_, _x_)
65 #define ASSERT_IRQL(x)
71 #define assert(x) ASSERT(x)
72 #define assert_irql(x) ASSERT_IRQL(x)
77 #define UNIMPLEMENTED \
78 NDIS_DbgPrint(MIN_TRACE, ("The function at %s:%d is unimplemented, \
79 but come back another day.\n", __FILE__, __LINE__));
83 #define UNIMPLEMENTED \
84 NDIS_DbgPrint(MIN_TRACE, ("%s at %s:%d is unimplemented, \
85 but come back another day.\n", __FUNCTION__, __FILE__, __LINE__));
91 do { NDIS_DbgPrint(MIN_TRACE, ("%s:%d\n", __FILE__, __LINE__)); } while(0);
93 #endif /* __DEBUG_H */