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
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_MEMORY 0x00000100
19 #define DEBUG_ULTRA 0xFFFFFFFF
23 extern ULONG DebugTraceLevel
;
27 #define NDIS_DbgPrint(_t_, _x_) \
28 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
29 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
30 DbgPrint("(%s:%d) ", __FILE__, __LINE__); \
36 #define NDIS_DbgPrint(_t_, _x_) \
37 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
38 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
39 DbgPrint("(%s:%d)(%s) ", __FILE__, __LINE__, __FUNCTION__); \
46 #define ASSERT_IRQL(x) ASSERT(KeGetCurrentIrql() <= (x))
47 #define ASSERT_IRQL_EQUAL(x) ASSERT(KeGetCurrentIrql() == (x))
51 #define NDIS_DbgPrint(_t_, _x_)
53 #define ASSERT_IRQL(x)
54 #define ASSERT_IRQL_EQUAL(x)
55 /* #define ASSERT(x) */ /* ndis.h */
60 #define assert(x) ASSERT(x)
61 #define assert_irql(x) ASSERT_IRQL(x)
66 #define UNIMPLEMENTED \
67 NDIS_DbgPrint(MIN_TRACE, ("The function at %s:%d is unimplemented, \
68 but come back another day.\n", __FILE__, __LINE__));
72 #define UNIMPLEMENTED \
73 NDIS_DbgPrint(MIN_TRACE, ("%s at %s:%d is unimplemented, \
74 but come back another day.\n", __FUNCTION__, __FILE__, __LINE__));
80 do { NDIS_DbgPrint(MIN_TRACE, ("%s:%d\n", __FILE__, __LINE__)); } while(0);