ReactOS
0.4.16-dev-250-g3ecd236
debug.h
Go to the documentation of this file.
1
/*
2
* COPYRIGHT: See COPYING in the top level directory
3
* PROJECT: ReactOS Intel PRO/1000 Driver
4
* FILE: include/debug.h
5
* PURPOSE: Debugging support macros
6
* DEFINES: DBG - Enable debug output
7
* NASSERT - Disable assertions
8
*/
9
10
#pragma once
11
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
17
18
#define DEBUG_MEMORY 0x00000100
19
#define DEBUG_ULTRA 0xFFFFFFFF
20
21
#if DBG
22
23
extern
ULONG
DebugTraceLevel
;
24
25
26
#define NDIS_DbgPrint(_t_, _x_) \
27
if ((_t_ > NORMAL_MASK) \
28
? (DebugTraceLevel & _t_) > NORMAL_MASK \
29
: (DebugTraceLevel & NORMAL_MASK) >= _t_) { \
30
DbgPrint("(%s:%d)(%s) "
, __FILE__, __LINE__, __FUNCTION__); \
31
DbgPrint _x_ ; \
32
}
33
34
35
#define ASSERT_IRQL(x) ASSERT(KeGetCurrentIrql() <= (x))
36
#define ASSERT_IRQL_EQUAL(x) ASSERT(KeGetCurrentIrql() == (x))
37
38
#else
/* DBG */
39
40
#define NDIS_DbgPrint(_t_, _x_)
41
42
#define ASSERT_IRQL(x)
43
#define ASSERT_IRQL_EQUAL(x)
44
/* #define ASSERT(x) */
/* ndis.h */
45
46
#endif
/* DBG */
47
48
49
#define assert(x) ASSERT(x)
50
#define assert_irql(x) ASSERT_IRQL(x)
51
52
53
#define UNIMPLEMENTED \
54
NDIS_DbgPrint(MIN_TRACE, ("UNIMPLEMENTED.\n"
));
55
56
57
#define UNIMPLEMENTED_DBGBREAK(...) \
58
do { \
59
NDIS_DbgPrint(MIN_TRACE, ("UNIMPLEMENTED.\n"
)); \
60
DbgPrint("" __VA_ARGS__); \
61
DbgBreakPoint(); \
62
} while (0)
63
64
65
const
char
*
Oid2Str
(
IN
NDIS_OID
Oid);
66
Oid2Str
const char * Oid2Str(IN NDIS_OID Oid)
Definition:
debug.c:12
DebugTraceLevel
ULONG DebugTraceLevel
Definition:
ndis.c:13
NDIS_OID
ULONG NDIS_OID
Definition:
ntddndis.h:230
IN
#define IN
Definition:
typedefs.h:39
ULONG
uint32_t ULONG
Definition:
typedefs.h:59
drivers
network
dd
e1000
debug.h
Generated on Fri Nov 8 2024 06:14:40 for ReactOS by
1.9.6