38#define PROTECTED_MEM_RTL
47#define UDF_DUMP_EXTENT
54#if defined UDF_DBG || defined PRINT_ALWAYS
69 #define KdPrint(_x_) DbgPrint _x_
71 #define KdPrint(a) {NOTHING;}
75 #define MmPrint(_x_) DbgPrint _x_
77 #define MmPrint(_x_) {NOTHING;}
81 extern ULONG UdfTimeStamp;
82 #define TmPrint(_x_) {UdfTimeStamp++;KdPrint(("TM:%d: ",UdfTimeStamp));KdPrint(_x_);}
84 #define TmPrint KdPrint
88 #define PerfPrint(_x_) DbgPrint _x_
90 #define PerfPrint(_x_) {NOTHING;}
94 #define AdPrint(_x_) {DbgPrint("Thrd:%x:",PsGetCurrentThread());DbgPrint _x_;}
96 #define AdPrint(_x_) {NOTHING;}
100 #define ThPrint(_x_) {DbgPrint("Thrd:%x:",PsGetCurrentThread());DbgPrint _x_;}
102 #define ThPrint(_x_) {NOTHING;}
105 #ifdef UDF_DUMP_EXTENT
106 #define ExtPrint(_x_) KdPrint(_x_)
108 #define ExtPrint(_x_) {NOTHING;}
113 #define MmPrint(_x_) {NOTHING;}
114 #define TmPrint(_x_) {NOTHING;}
115 #define PerfPrint(_x_) {NOTHING;}
116 #define AdPrint(_x_) {NOTHING;}
117 #define ThPrint(_x_) {NOTHING;}
118 #define ExtPrint(_x_) {NOTHING;}
128#if defined ALWAYS_CHECK_WAIT_TIMEOUT
129 #define DbgWaitForSingleObject(o, to) DbgWaitForSingleObject_(o, to)
131 #define DbgWaitForSingleObject(o, to) KeWaitForSingleObject(o, Executive, KernelMode, FALSE, to);
138#define UDFBreakPoint() { __asm int 3 }
141#define UDFBreakPoint() DbgBreakPoint()
145#define BrutePoint() UDFBreakPoint()
147#define BrutePoint() {}
150#ifdef CHECK_REF_COUNTS
151#define ASSERT_REF(_a_) ASSERT(_a_)
153#define ASSERT_REF(_a_) {NOTHING;}
156#ifdef TRACK_SYS_ALLOCS
159#ifdef TRACK_SYS_ALLOC_CALLERS
165#ifdef TRACK_SYS_ALLOC_CALLERS
166 #define DbgAllocatePoolWithTag(a,b,c) DebugAllocatePool(a,b,UDF_BUG_CHECK_ID,__LINE__)
167 #define DbgAllocatePool(x,y) DebugAllocatePool(x,y,UDF_BUG_CHECK_ID,__LINE__)
169 #define DbgAllocatePoolWithTag(a,b,c) DebugAllocatePool(a,b)
170 #define DbgAllocatePool(x,y) DebugAllocatePool(x,y)
172#define DbgFreePool(x) DebugFreePool(x)
176#define DbgAllocatePoolWithTag(a,b,c) ExAllocatePoolWithTag(a,b,c)
177#define DbgAllocatePool(x,y) ExAllocatePoolWithTag(x,y,'Fnwd')
178#define DbgFreePool(x) ExFreePool(x)
183#ifdef PROTECTED_MEM_RTL
185#define DbgMoveMemory(d, s, l) \
187 RtlMoveMemory(d, s, l); \
188} _SEH2_EXCEPT (EXCEPTION_EXECUTE_HANDLER) { \
192#define DbgCopyMemory(d, s, l) \
194 RtlCopyMemory(d, s, l); \
195} _SEH2_EXCEPT (EXCEPTION_EXECUTE_HANDLER) { \
212#define DbgMoveMemory(d, s, l) RtlMoveMemory(d, s, l)
213#define DbgCopyMemory(d, s, l) RtlCopyMemory(d, s, l)
214#define DbgCompareMemory(d, s, l) RtlCompareMemory(d, s, l)
220#ifdef VALIDATE_STRUCTURES
221#define ValidateFileInfo(fi) \
223 if(!fi || (fi)->IntegrityTag) { \
224 KdPrint(("UDF: ERROR! Using deallocated structure !!!\n"));\
227 if(fi && !fi->Dloc) { \
228 KdPrint(("UDF: ERROR! FI without Dloc !!!\n"));\
234#define ValidateFileInfo(fi) {}
237#if defined (_X86_) && defined (_MSC_VER)
259#define DbgAllocatePool(x,y) ExAllocatePoolWithTag(x,y,'Fnwd')
260#define DbgFreePool(x) ExFreePool(x)
261#define DbgAllocatePoolWithTag(a,b,c) ExAllocatePoolWithTag(a,b,c)
263#define DbgMoveMemory(d, s, l) RtlMoveMemory(d, s, l)
264#define DbgCopyMemory(d, s, l) RtlCopyMemory(d, s, l)
265#define DbgCompareMemory(d, s, l) RtlCompareMemory(d, s, l)
267#define ASSERT_REF(_a_) {NOTHING;}
269#define UDFBreakPoint() {}
270#define BrutePoint() {}
271#define ValidateFileInfo(fi) {}
273#define UDFTouch(addr) {}
277#if defined UDF_DBG || defined PRINT_ALWAYS
282 for(i=0; i<(b); i++) { \
284 c = (ULONG)(*(((PUCHAR)(a))+i)); \
285 KdPrint(("%2.2x ",c)); \
286 if ((i & 0x0f) == 0x0f) KdPrint(("\n")); \
293#define KdDump(a,b) {}
297#define UserPrint KdPrint
#define RtlCompareMemory(s1, s2, l)
GLenum const GLvoid * addr
GLboolean GLboolean GLboolean GLboolean a
#define EXCEPTION_EXECUTE_HANDLER
#define _SEH2_EXCEPT(...)
PULONG MinorVersion OPTIONAL
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl eax
#define DbgCompareMemory(d, s, l)
NTSTATUS DbgWaitForSingleObject_(IN PVOID Object, IN PLARGE_INTEGER Timeout OPTIONAL)
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object