1 /*++
2 
3 Copyright (c) Microsoft Corporation.  All rights reserved.
4 
5 Module Name:
6 
7     DbgTrace.h
8 
9 Abstract:
10 
11     This file can be used to redirect WPP traces to
12     debugger.
13 
14 
15 
16 
17 
18 
19 
20 Author:
21 
22 
23 
24 Environment:
25 
26     Both kernel and user mode
27 
28 Revision History:
29 
30 --*/
31 
32 #if !defined(EVENT_TRACING)
33 
34 
35 
36 
37 
38 
39 
40 #if !defined(TRACE_LEVEL_NONE)
41   #define TRACE_LEVEL_NONE        0
42   #define TRACE_LEVEL_CRITICAL    1
43   #define TRACE_LEVEL_FATAL       1
44   #define TRACE_LEVEL_ERROR       2
45   #define TRACE_LEVEL_WARNING     3
46   #define TRACE_LEVEL_INFORMATION 4
47   #define TRACE_LEVEL_VERBOSE     5
48   #define TRACE_LEVEL_RESERVED6   6
49   #define TRACE_LEVEL_RESERVED7   7
50   #define TRACE_LEVEL_RESERVED8   8
51   #define TRACE_LEVEL_RESERVED9   9
52 #endif
53 
54 
55 //
56 // Define Debug Flags
57 //
58 #define TRACINGDEVICE         0x00000001
59 #define TRACINGOBJECT         0x00000002
60 #define TRACINGAPIERROR       0x00000004
61 #define TRACINGHANDLE         0x00000008
62 #define TRACINGPOOL           0x00000010
63 #define TRACINGERROR          0x00000020
64 #define TRACINGUSEROBJECT     0x00000040
65 #define TRACINGREQUEST        0x00000080
66 #define TRACINGIO             0x00000100
67 #define TRACINGPNP            0x00000200
68 #define TRACINGDRIVER         0x00001000
69 #define TRACINGPNPPOWERSTATES 0x00002000
70 
71 #define TRACINGDMA            0x00004000 // __REACTOS__
72 #define TRACINGIOTARGET       0x00008000 // __REACTOS__
73 
74 extern "C" {
75 void
76 __cdecl
77 DoTraceLevelMessage    (
78     __in PVOID FxDriverGlobals,
79     __in ULONG   DebugPrintLevel,
80     __in ULONG   DebugPrintFlag,
81     __drv_formatString(FormatMessage)
82     __in PCSTR   DebugMessage,
83     ...
84     );
85 }
86 
87 //
88 // When linking the lib with UMDF framework we don't want these macros
89 // to be defined since UMDF WPP tracing uses these macros
90 
91 
92 
93 //
94 #ifndef UMDF
95 #define WPP_INIT_TRACING(DriverObject, RegistryPath)
96 #define WPP_CLEANUP(DriverObject)
97 #endif
98 
99 extern "C" {
100 extern ULONG DebugLevel;
101 extern ULONG DebugFlag;
102 }
103 
104 #endif
105