- In Win32 DBG is defined to 0 for a non-debug build and to 1 for a debug build. In ReactOS we do this slightly different: DBG is correctly defined to 1 for debug, but not defined at all on non-debug/release build. Because gcc is awesome we can then check for debug compilation with both #ifdef DBG and #if DBG (error free! yay gcc!), and so we have mixed usage all over the tree.

- Fix this by defining DBG on non-debug build too and deprecate all usage of #ifdef DBG.

svn path=/trunk/; revision=41436
This commit is contained in:
Stefan Ginsberg 2009-06-17 12:44:05 +00:00
parent 3d402751d4
commit 88e9b2a513
96 changed files with 169 additions and 163 deletions

View file

@ -19,6 +19,10 @@
<define name="_SEH_ENABLE_TRACE" /> <define name="_SEH_ENABLE_TRACE" />
<property name="DBG_OR_KDBG" value="true" /> <property name="DBG_OR_KDBG" value="true" />
</if> </if>
<if property="DBG" value="0">
<define name="DBG">0</define>
</if>
<if property="KDBG" value="1"> <if property="KDBG" value="1">
<define name="KDBG">1</define> <define name="KDBG">1</define>
<property name="DBG_OR_KDBG" value="true" /> <property name="DBG_OR_KDBG" value="true" />

View file

@ -11,6 +11,10 @@
<define name="_SEH_ENABLE_TRACE" /> <define name="_SEH_ENABLE_TRACE" />
<property name="DBG_OR_KDBG" value="true" /> <property name="DBG_OR_KDBG" value="true" />
</if> </if>
<if property="DBG" value="0">
<define name="DBG">0</define>
</if>
<if property="KDBG" value="1"> <if property="KDBG" value="1">
<define name="KDBG">1</define> <define name="KDBG">1</define>
<property name="DBG_OR_KDBG" value="true" /> <property name="DBG_OR_KDBG" value="true" />

View file

@ -18,7 +18,7 @@
#define DEBUG_ADAPTER 0x00000100 #define DEBUG_ADAPTER 0x00000100
#define DEBUG_ULTRA 0xFFFFFFFF #define DEBUG_ULTRA 0xFFFFFFFF
#ifdef DBG #if DBG
extern unsigned long debug_trace_level; extern unsigned long debug_trace_level;

View file

@ -43,7 +43,7 @@ CreateCommonFreeLoaderSections(PINICACHE IniCache)
IniSection = IniCacheAppendSection(IniCache, IniSection = IniCacheAppendSection(IniCache,
L"FREELOADER"); L"FREELOADER");
#ifdef DBG #if DBG
if (IsUnattendedSetup) if (IsUnattendedSetup)
{ {
/* DefaultOS=ReactOS */ /* DefaultOS=ReactOS */
@ -64,7 +64,7 @@ CreateCommonFreeLoaderSections(PINICACHE IniCache)
L"ReactOS"); L"ReactOS");
} }
#ifdef DBG #if DBG
if (IsUnattendedSetup) if (IsUnattendedSetup)
#endif #endif
{ {
@ -75,7 +75,7 @@ CreateCommonFreeLoaderSections(PINICACHE IniCache)
L"TimeOut", L"TimeOut",
L"0"); L"0");
} }
#ifdef DBG #if DBG
else else
{ {
/* Timeout=0 or 10 */ /* Timeout=0 or 10 */
@ -380,7 +380,7 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath,
L"ReactOS_Debug", L"ReactOS_Debug",
L"\"ReactOS (Debug)\""); L"\"ReactOS (Debug)\"");
#ifdef DBG #if DBG
/* ReactOS_KdSerial="ReactOS (RosDbg)" */ /* ReactOS_KdSerial="ReactOS (RosDbg)" */
IniCacheInsertKey(IniSection, IniCacheInsertKey(IniSection,
NULL, NULL,
@ -453,7 +453,7 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath,
L"Options", L"Options",
L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS"); L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS");
#ifdef DBG #if DBG
/* Create "ReactOS_KdSerial" section */ /* Create "ReactOS_KdSerial" section */
IniSection = IniCacheAppendSection(IniCache, IniSection = IniCacheAppendSection(IniCache,

View file

@ -34,7 +34,7 @@ BOOL ScmShutdown = FALSE;
VOID VOID
PrintString(LPCSTR fmt, ...) PrintString(LPCSTR fmt, ...)
{ {
#ifdef DBG #if DBG
CHAR buffer[512]; CHAR buffer[512];
va_list ap; va_list ap;

View file

@ -163,7 +163,7 @@ BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT B
memcpy(Buffer, Ptr, BufferSize); memcpy(Buffer, Ptr, BufferSize);
#ifdef DBG #if DBG
DPRINTM(DPRINT_DISK, "size of buffer: %x\n", Ptr[0]); DPRINTM(DPRINT_DISK, "size of buffer: %x\n", Ptr[0]);
DPRINTM(DPRINT_DISK, "information flags: %x\n", Ptr[1]); DPRINTM(DPRINT_DISK, "information flags: %x\n", Ptr[1]);
DPRINTM(DPRINT_DISK, "number of physical cylinders on drive: %u\n", *(PULONG)&Ptr[2]); DPRINTM(DPRINT_DISK, "number of physical cylinders on drive: %u\n", *(PULONG)&Ptr[2]);

View file

@ -23,7 +23,7 @@
/* MACROS *******************************************************************/ /* MACROS *******************************************************************/
#ifdef DBG #if DBG
#define DEFAULT_BAUD_RATE 19200 #define DEFAULT_BAUD_RATE 19200
@ -275,11 +275,11 @@ VOID Rs232PortPutByte(UCHAR ByteToSend)
WRITE_PORT_UCHAR (SER_THR(Rs232PortBase), ByteToSend); WRITE_PORT_UCHAR (SER_THR(Rs232PortBase), ByteToSend);
} }
#endif /* defined DBG */ #endif /* DBG */
BOOLEAN Rs232PortInUse(ULONG Base) BOOLEAN Rs232PortInUse(ULONG Base)
{ {
#ifdef DBG #if DBG
return PortInitialized && Rs232PortBase == (PUCHAR)(ULONG_PTR)Base ? TRUE : FALSE; return PortInitialized && Rs232PortBase == (PUCHAR)(ULONG_PTR)Base ? TRUE : FALSE;
#else #else
return FALSE; return FALSE;

View file

@ -21,7 +21,7 @@
#include <debug.h> #include <debug.h>
#ifdef DBG #if DBG
//#define DEBUG_ALL //#define DEBUG_ALL
//#define DEBUG_INIFILE //#define DEBUG_INIFILE
@ -297,7 +297,7 @@ ULONG DbgPrint(PCCH Format, ...)
return 0; return 0;
} }
#endif // defined DBG #endif // DBG
ULONG ULONG
MsgBoxPrint(const char *Format, ...) MsgBoxPrint(const char *Format, ...)

View file

@ -427,7 +427,7 @@ static BOOLEAN NtfsReadMftRecord(ULONG MFTIndex, PNTFS_MFT_RECORD Buffer)
return NtfsFixupRecord((PNTFS_RECORD)Buffer); return NtfsFixupRecord((PNTFS_RECORD)Buffer);
} }
#ifdef DBG #if DBG
VOID NtfsPrintFile(PNTFS_INDEX_ENTRY IndexEntry) VOID NtfsPrintFile(PNTFS_INDEX_ENTRY IndexEntry)
{ {
PWCHAR FileName; PWCHAR FileName;
@ -455,7 +455,7 @@ static BOOLEAN NtfsCompareFileName(PCHAR FileName, PNTFS_INDEX_ENTRY IndexEntry)
EntryFileName = IndexEntry->FileName.FileName; EntryFileName = IndexEntry->FileName.FileName;
EntryFileNameLength = IndexEntry->FileName.FileNameLength; EntryFileNameLength = IndexEntry->FileName.FileNameLength;
#ifdef DBG #if DBG
NtfsPrintFile(IndexEntry); NtfsPrintFile(IndexEntry);
#endif #endif

View file

@ -39,7 +39,7 @@
extern char* g_file; extern char* g_file;
extern int g_line; extern int g_line;
#ifdef DBG #if DBG
VOID DbgPrintMask(ULONG Mask, char *format, ...); VOID DbgPrintMask(ULONG Mask, char *format, ...);
VOID DebugInit(VOID); VOID DebugInit(VOID);
@ -85,6 +85,6 @@ void MEMORY_WRITE_BREAKPOINT4(unsigned long addr);
#define BugCheck(_x_) #define BugCheck(_x_)
#define DbgDumpBuffer(_x_, _y_, _z_) #define DbgDumpBuffer(_x_, _y_, _z_)
#endif // defined DBG #endif // DBG
#endif // defined __DEBUG_H #endif // defined __DEBUG_H

View file

@ -87,7 +87,7 @@ extern ULONG TotalPagesInLookupTable;
extern ULONG FreePagesInLookupTable; extern ULONG FreePagesInLookupTable;
extern ULONG LastFreePageHint; extern ULONG LastFreePageHint;
#ifdef DBG #if DBG
PCSTR MmGetSystemMemoryMapTypeString(MEMORY_TYPE Type); PCSTR MmGetSystemMemoryMapTypeString(MEMORY_TYPE Type);
#endif #endif

View file

@ -21,7 +21,7 @@
#include <freeldr.h> #include <freeldr.h>
#include <debug.h> #include <debug.h>
#ifdef DBG #if DBG
typedef struct typedef struct
{ {
MEMORY_TYPE Type; MEMORY_TYPE Type;
@ -54,13 +54,13 @@ extern ULONG_PTR MmHeapStart;
BOOLEAN MmInitializeMemoryManager(VOID) BOOLEAN MmInitializeMemoryManager(VOID)
{ {
#ifdef DBG #if DBG
MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; MEMORY_DESCRIPTOR* MemoryDescriptor = NULL;
#endif #endif
DPRINTM(DPRINT_MEMORY, "Initializing Memory Manager.\n"); DPRINTM(DPRINT_MEMORY, "Initializing Memory Manager.\n");
#ifdef DBG #if DBG
// Dump the system memory map // Dump the system memory map
DPRINTM(DPRINT_MEMORY, "System Memory Map (Base Address, Length, Type):\n"); DPRINTM(DPRINT_MEMORY, "System Memory Map (Base Address, Length, Type):\n");
while ((MemoryDescriptor = ArcGetMemoryDescriptor(MemoryDescriptor)) != NULL) while ((MemoryDescriptor = ArcGetMemoryDescriptor(MemoryDescriptor)) != NULL)
@ -128,7 +128,7 @@ VOID MmInitializeHeap(PVOID PageLookupTable)
DPRINTM(DPRINT_MEMORY, "Heap initialized, base 0x%08x, pages %d\n", (HeapStart << MM_PAGE_SHIFT), PagesNeeded); DPRINTM(DPRINT_MEMORY, "Heap initialized, base 0x%08x, pages %d\n", (HeapStart << MM_PAGE_SHIFT), PagesNeeded);
} }
#ifdef DBG #if DBG
PCSTR MmGetSystemMemoryMapTypeString(MEMORY_TYPE Type) PCSTR MmGetSystemMemoryMapTypeString(MEMORY_TYPE Type)
{ {
ULONG Index; ULONG Index;

View file

@ -20,7 +20,7 @@
#include <freeldr.h> #include <freeldr.h>
#include <debug.h> #include <debug.h>
#ifdef DBG #if DBG
VOID DumpMemoryAllocMap(VOID); VOID DumpMemoryAllocMap(VOID);
VOID MemAllocTest(VOID); VOID MemAllocTest(VOID);
#endif // DBG #endif // DBG
@ -69,7 +69,7 @@ PVOID MmAllocateMemoryWithType(ULONG MemorySize, TYPE_OF_MEMORY MemoryType)
FreePagesInLookupTable -= PagesNeeded; FreePagesInLookupTable -= PagesNeeded;
MemPointer = (PVOID)((ULONG_PTR)FirstFreePageFromEnd * MM_PAGE_SIZE); MemPointer = (PVOID)((ULONG_PTR)FirstFreePageFromEnd * MM_PAGE_SIZE);
#ifdef DBG #if DBG
DPRINTM(DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d.\n", MemorySize, PagesNeeded, FirstFreePageFromEnd); DPRINTM(DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d.\n", MemorySize, PagesNeeded, FirstFreePageFromEnd);
DPRINTM(DPRINT_MEMORY, "Memory allocation pointer: 0x%x\n", MemPointer); DPRINTM(DPRINT_MEMORY, "Memory allocation pointer: 0x%x\n", MemPointer);
#endif // DBG #endif // DBG
@ -169,7 +169,7 @@ PVOID MmAllocateMemoryAtAddress(ULONG MemorySize, PVOID DesiredAddress, TYPE_OF_
FreePagesInLookupTable -= PagesNeeded; FreePagesInLookupTable -= PagesNeeded;
MemPointer = (PVOID)((ULONG_PTR)StartPageNumber * MM_PAGE_SIZE); MemPointer = (PVOID)((ULONG_PTR)StartPageNumber * MM_PAGE_SIZE);
#ifdef DBG #if DBG
DPRINTM(DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d.\n", MemorySize, PagesNeeded, StartPageNumber); DPRINTM(DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d.\n", MemorySize, PagesNeeded, StartPageNumber);
DPRINTM(DPRINT_MEMORY, "Memory allocation pointer: 0x%x\n", MemPointer); DPRINTM(DPRINT_MEMORY, "Memory allocation pointer: 0x%x\n", MemPointer);
#endif // DBG #endif // DBG
@ -242,7 +242,7 @@ PVOID MmAllocateHighestMemoryBelowAddress(ULONG MemorySize, PVOID DesiredAddress
FreePagesInLookupTable -= PagesNeeded; FreePagesInLookupTable -= PagesNeeded;
MemPointer = (PVOID)((ULONG_PTR)FirstFreePageFromEnd * MM_PAGE_SIZE); MemPointer = (PVOID)((ULONG_PTR)FirstFreePageFromEnd * MM_PAGE_SIZE);
#ifdef DBG #if DBG
DPRINTM(DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d.\n", MemorySize, PagesNeeded, FirstFreePageFromEnd); DPRINTM(DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d.\n", MemorySize, PagesNeeded, FirstFreePageFromEnd);
DPRINTM(DPRINT_MEMORY, "Memory allocation pointer: 0x%x\n", MemPointer); DPRINTM(DPRINT_MEMORY, "Memory allocation pointer: 0x%x\n", MemPointer);
#endif // DBG #endif // DBG
@ -259,7 +259,7 @@ VOID MmFreeMemory(PVOID MemoryPointer)
{ {
} }
#ifdef DBG #if DBG
VOID DumpMemoryAllocMap(VOID) VOID DumpMemoryAllocMap(VOID)
{ {

View file

@ -143,7 +143,7 @@ VOID LoadReactOSSetup(VOID)
if (!*SourcePath) if (!*SourcePath)
SourcePath = "\\"; SourcePath = "\\";
#ifdef DBG #if DBG
/* Get load options */ /* Get load options */
if (InfFindFirstLine (InfHandle, if (InfFindFirstLine (InfHandle,
"SetupData", "SetupData",

View file

@ -20,7 +20,7 @@
#include <freeldr.h> #include <freeldr.h>
#ifdef DBG #if DBG
VOID FASTCALL VOID FASTCALL
CHECK_PAGED_CODE_RTL(char *file, int line) CHECK_PAGED_CODE_RTL(char *file, int line)
{ {

View file

@ -614,7 +614,7 @@ WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
DPRINTM(DPRINT_WINDOWS, "Memory Descriptor List prepared, printing PDE\n"); DPRINTM(DPRINT_WINDOWS, "Memory Descriptor List prepared, printing PDE\n");
List_PaToVa(&LoaderBlock->MemoryDescriptorListHead); List_PaToVa(&LoaderBlock->MemoryDescriptorListHead);
#ifdef DBG #if DBG
{ {
ULONG *PDE_Addr=(ULONG *)PDE;//0xC0300000; ULONG *PDE_Addr=(ULONG *)PDE;//0xC0300000;
int j; int j;

View file

@ -28,7 +28,7 @@ typedef BOOL
ULONG ul_reason_for_call, ULONG ul_reason_for_call,
LPVOID lpReserved); LPVOID lpReserved);
#if defined(KDBG) || defined(DBG) #if defined(KDBG) || DBG
VOID VOID
LdrpLoadUserModuleSymbols(PLDR_DATA_TABLE_ENTRY LdrModule); LdrpLoadUserModuleSymbols(PLDR_DATA_TABLE_ENTRY LdrModule);
#endif #endif

View file

@ -427,7 +427,7 @@ LdrpInit2(PCONTEXT Context,
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList, InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
&NtModule->InInitializationOrderModuleList); &NtModule->InInitializationOrderModuleList);
#if defined(DBG) || defined(KDBG) #if DBG || defined(KDBG)
LdrpLoadUserModuleSymbols(NtModule); LdrpLoadUserModuleSymbols(NtModule);
@ -475,7 +475,7 @@ LdrpInit2(PCONTEXT Context,
LdrpInitLoader(); LdrpInitLoader();
#if defined(DBG) || defined(KDBG) #if DBG || defined(KDBG)
LdrpLoadUserModuleSymbols(ExeModule); LdrpLoadUserModuleSymbols(ExeModule);

View file

@ -69,7 +69,7 @@ static VOID LdrpDetachProcess(BOOLEAN UnloadAll);
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
#if defined(DBG) || defined(KDBG) #if DBG || defined(KDBG)
VOID VOID
LdrpLoadUserModuleSymbols(PLDR_DATA_TABLE_ENTRY LdrModule) LdrpLoadUserModuleSymbols(PLDR_DATA_TABLE_ENTRY LdrModule)
@ -2274,7 +2274,7 @@ LdrpLoadModule(IN PWSTR SearchPath OPTIONAL,
DPRINT1("LdrFixupImports failed for %wZ, status=%x\n", &(*Module)->BaseDllName, Status); DPRINT1("LdrFixupImports failed for %wZ, status=%x\n", &(*Module)->BaseDllName, Status);
return Status; return Status;
} }
#if defined(DBG) || defined(KDBG) #if DBG || defined(KDBG)
LdrpLoadUserModuleSymbols(*Module); LdrpLoadUserModuleSymbols(*Module);
#endif /* DBG || KDBG */ #endif /* DBG || KDBG */
RtlEnterCriticalSection(NtCurrentPeb()->LoaderLock); RtlEnterCriticalSection(NtCurrentPeb()->LoaderLock);

View file

@ -162,7 +162,7 @@ RtlpFreeMemory(PVOID Mem,
} }
#ifdef DBG #if DBG
VOID FASTCALL VOID FASTCALL
CHECK_PAGED_CODE_RTL(char *file, int line) CHECK_PAGED_CODE_RTL(char *file, int line)
{ {

View file

@ -26,7 +26,7 @@
#define EXPORT CALLBACK #define EXPORT CALLBACK
#endif #endif
#ifdef DBG #if DBG
/* See debug.h for debug/trace constants */ /* See debug.h for debug/trace constants */
DWORD DebugTraceLevel = MAX_TRACE; DWORD DebugTraceLevel = MAX_TRACE;
#endif /* DBG */ #endif /* DBG */

View file

@ -22,7 +22,7 @@
#undef ASSERT #undef ASSERT
#endif #endif
#ifdef DBG #if DBG
extern DWORD DebugTraceLevel; extern DWORD DebugTraceLevel;

View file

@ -14,7 +14,7 @@
#include <debug.h> #include <debug.h>
#ifdef DBG #if DBG
//DWORD DebugTraceLevel = DEBUG_ULTRA; //DWORD DebugTraceLevel = DEBUG_ULTRA;
DWORD DebugTraceLevel = 0; DWORD DebugTraceLevel = 0;
#endif /* DBG */ #endif /* DBG */

View file

@ -19,7 +19,7 @@
ULONG DbgPrint(PCH Format,...); ULONG DbgPrint(PCH Format,...);
#ifdef DBG #if DBG
extern DWORD DebugTraceLevel; extern DWORD DebugTraceLevel;

View file

@ -26,7 +26,7 @@
#endif #endif
#ifdef DBG #if DBG
/* See debug.h for debug/trace constants */ /* See debug.h for debug/trace constants */
DWORD DebugTraceLevel = MAX_TRACE; DWORD DebugTraceLevel = MAX_TRACE;

View file

@ -22,7 +22,7 @@
#undef ASSERT #undef ASSERT
#endif #endif
#ifdef DBG #if DBG
extern DWORD DebugTraceLevel; extern DWORD DebugTraceLevel;

View file

@ -32,7 +32,7 @@ DereferenceProviderByPointer(PCATALOG_ENTRY Provider)
{ {
WS_DbgPrint(MAX_TRACE, ("Provider (0x%X).\n", Provider)); WS_DbgPrint(MAX_TRACE, ("Provider (0x%X).\n", Provider));
#ifdef DBG #if DBG
if (Provider->ReferenceCount <= 0) if (Provider->ReferenceCount <= 0)
{ {
WS_DbgPrint(MIN_TRACE, ("Provider at 0x%X has invalid reference count (%ld).\n", WS_DbgPrint(MIN_TRACE, ("Provider at 0x%X has invalid reference count (%ld).\n",

View file

@ -14,7 +14,7 @@
#include <handle.h> #include <handle.h>
#include <upcall.h> #include <upcall.h>
#ifdef DBG #if DBG
/* See debug.h for debug/trace constants */ /* See debug.h for debug/trace constants */
//DWORD DebugTraceLevel = MIN_TRACE; //DWORD DebugTraceLevel = MIN_TRACE;
@ -657,7 +657,7 @@ WSAAccept(IN SOCKET s,
if ( addr ) if ( addr )
{ {
#ifdef DBG #if DBG
LPSOCKADDR_IN sa = (LPSOCKADDR_IN)addr; LPSOCKADDR_IN sa = (LPSOCKADDR_IN)addr;
WS_DbgPrint(MAX_TRACE,("Returned address: %d %s:%d (len %d)\n", WS_DbgPrint(MAX_TRACE,("Returned address: %d %s:%d (len %d)\n",
sa->sin_family, sa->sin_family,

View file

@ -21,7 +21,7 @@
#undef ASSERT #undef ASSERT
#endif #endif
#ifdef DBG #if DBG
extern DWORD DebugTraceLevel; extern DWORD DebugTraceLevel;

View file

@ -10,7 +10,7 @@
#include "ws2help.h" #include "ws2help.h"
#include <debug.h> #include <debug.h>
#ifdef DBG #if DBG
/* See debug.h for debug/trace constants */ /* See debug.h for debug/trace constants */
DWORD DebugTraceLevel = MAX_TRACE; DWORD DebugTraceLevel = MAX_TRACE;

View file

@ -17,7 +17,7 @@
#define DEBUG_ULTRA 0xFFFFFFFF #define DEBUG_ULTRA 0xFFFFFFFF
#ifdef DBG #if DBG
extern DWORD DebugTraceLevel; extern DWORD DebugTraceLevel;

View file

@ -11,7 +11,7 @@
#include <debug.h> #include <debug.h>
#ifdef DBG #if DBG
/* See debug.h for debug/trace constants */ /* See debug.h for debug/trace constants */
DWORD DebugTraceLevel = MAX_TRACE; DWORD DebugTraceLevel = MAX_TRACE;

View file

@ -267,7 +267,7 @@ VfatSetDispositionInformation(PFILE_OBJECT FileObject,
PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT DeviceObject,
PFILE_DISPOSITION_INFORMATION DispositionInfo) PFILE_DISPOSITION_INFORMATION DispositionInfo)
{ {
#ifdef DBG #if DBG
PDEVICE_EXTENSION DeviceExt = DeviceObject->DeviceExtension; PDEVICE_EXTENSION DeviceExt = DeviceObject->DeviceExtension;
#endif #endif

View file

@ -42,7 +42,7 @@ ReadRegistryEntries(
/* Default value for CrashOnCtrlScroll depends if we're /* Default value for CrashOnCtrlScroll depends if we're
* running a debug build or a normal build. * running a debug build or a normal build.
*/ */
#ifdef DBG #if DBG
DefaultCrashOnCtrlScroll = 1; DefaultCrashOnCtrlScroll = 1;
#else #else
DefaultCrashOnCtrlScroll = 0; DefaultCrashOnCtrlScroll = 0;

View file

@ -264,7 +264,7 @@ UINT SocketAcquireStateLock( PAFD_FCB FCB ) {
} }
VOID SocketStateUnlock( PAFD_FCB FCB ) { VOID SocketStateUnlock( PAFD_FCB FCB ) {
#ifdef DBG #if DBG
PVOID CurrentThread = KeGetCurrentThread(); PVOID CurrentThread = KeGetCurrentThread();
#endif #endif
ASSERT(FCB->LockCount > 0); ASSERT(FCB->LockCount > 0);

View file

@ -17,7 +17,7 @@
#include "tdiconn.h" #include "tdiconn.h"
#include "debug.h" #include "debug.h"
#ifdef DBG #if DBG
/* See debug.h for debug/trace constants */ /* See debug.h for debug/trace constants */
//DWORD DebugTraceLevel = DEBUG_ULTRA; //DWORD DebugTraceLevel = DEBUG_ULTRA;
@ -349,7 +349,7 @@ AfdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{ {
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp); PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
NTSTATUS Status = STATUS_SUCCESS; NTSTATUS Status = STATUS_SUCCESS;
#ifdef DBG #if DBG
PFILE_OBJECT FileObject = IrpSp->FileObject; PFILE_OBJECT FileObject = IrpSp->FileObject;
#endif #endif

View file

@ -13,7 +13,7 @@
#include "tdiconn.h" #include "tdiconn.h"
#include "tdi_proto.h" #include "tdi_proto.h"
#ifdef DBG #if DBG
#if 0 #if 0
static VOID DisplayBuffer( static VOID DisplayBuffer(
PVOID Buffer, PVOID Buffer,

View file

@ -19,7 +19,7 @@
#define DEBUG_IRP 0x00000200 #define DEBUG_IRP 0x00000200
#define DEBUG_ULTRA 0xFFFFFFFF #define DEBUG_ULTRA 0xFFFFFFFF
#ifdef DBG #if DBG
extern DWORD DebugTraceLevel; extern DWORD DebugTraceLevel;

View file

@ -18,7 +18,7 @@
#define DEBUG_MEMORY 0x00000100 #define DEBUG_MEMORY 0x00000100
#define DEBUG_ULTRA 0xFFFFFFFF #define DEBUG_ULTRA 0xFFFFFFFF
#ifdef DBG #if DBG
extern ULONG DebugTraceLevel; extern ULONG DebugTraceLevel;

View file

@ -479,7 +479,7 @@ NDIS_STATUS NICStop(
NdisStallExecution(500); NdisStallExecution(500);
} }
#ifdef DBG #if DBG
if (i == 4) if (i == 4)
NDIS_DbgPrint(MIN_TRACE, ("NIC was not reset after 2ms.\n")); NDIS_DbgPrint(MIN_TRACE, ("NIC was not reset after 2ms.\n"));
#endif #endif
@ -686,7 +686,7 @@ VOID NICReadDataAlign(
NdisStallExecution(4); NdisStallExecution(4);
} }
#ifdef DBG #if DBG
if (Count == 0xFFFF) if (Count == 0xFFFF)
NDIS_DbgPrint(MIN_TRACE, ("Remote DMA did not complete.\n")); NDIS_DbgPrint(MIN_TRACE, ("Remote DMA did not complete.\n"));
#endif #endif
@ -741,7 +741,7 @@ VOID NICWriteDataAlign(
NdisStallExecution(4); NdisStallExecution(4);
} }
#ifdef DBG #if DBG
if (Count == 0xFFFF) if (Count == 0xFFFF)
NDIS_DbgPrint(MIN_TRACE, ("Remote DMA did not complete.\n")); NDIS_DbgPrint(MIN_TRACE, ("Remote DMA did not complete.\n"));
#endif #endif
@ -778,7 +778,7 @@ VOID NICWriteDataAlign(
NdisStallExecution(4); NdisStallExecution(4);
} }
#ifdef DBG #if DBG
if (Count == 0xFFFF) if (Count == 0xFFFF)
NDIS_DbgPrint(MIN_TRACE, ("Remote DMA did not complete.\n")); NDIS_DbgPrint(MIN_TRACE, ("Remote DMA did not complete.\n"));
#endif #endif
@ -1184,7 +1184,7 @@ static VOID HandleReceive(
NdisStallExecution(500); NdisStallExecution(500);
} }
#ifdef DBG #if DBG
if (i == 4) if (i == 4)
NDIS_DbgPrint(MIN_TRACE, ("NIC was not reset after 2ms.\n")); NDIS_DbgPrint(MIN_TRACE, ("NIC was not reset after 2ms.\n"));
#endif #endif

View file

@ -19,7 +19,7 @@ DriverEntry(
PUNICODE_STRING RegistryPath); PUNICODE_STRING RegistryPath);
#ifdef DBG #if DBG
/* See debug.h for debug/trace constants */ /* See debug.h for debug/trace constants */
ULONG DebugTraceLevel = 0; ULONG DebugTraceLevel = 0;

View file

@ -33,7 +33,7 @@
#define DEBUG_CPOINT 0x00800000 #define DEBUG_CPOINT 0x00800000
#define DEBUG_ULTRA 0xFFFFFFFF #define DEBUG_ULTRA 0xFFFFFFFF
#ifdef DBG #if DBG
extern DWORD DebugTraceLevel; extern DWORD DebugTraceLevel;

View file

@ -19,7 +19,7 @@
#define DEBUG_PACKET 0x00000800 #define DEBUG_PACKET 0x00000800
#define DEBUG_ULTRA 0xFFFFFFFF #define DEBUG_ULTRA 0xFFFFFFFF
#ifdef DBG #if DBG
extern ULONG DebugTraceLevel; extern ULONG DebugTraceLevel;

View file

@ -108,7 +108,7 @@ extern LIST_ENTRY AdapterListHead;
extern KSPIN_LOCK AdapterListLock; extern KSPIN_LOCK AdapterListLock;
#ifdef DBG #if DBG
VOID VOID
MiniDisplayPacket( MiniDisplayPacket(
PNDIS_PACKET Packet); PNDIS_PACKET Packet);

View file

@ -14,7 +14,7 @@
#include "ndissys.h" #include "ndissys.h"
#ifdef DBG #if DBG
/* See debug.h for debug/trace constants */ /* See debug.h for debug/trace constants */
ULONG DebugTraceLevel = MIN_TRACE; ULONG DebugTraceLevel = MIN_TRACE;

View file

@ -62,7 +62,7 @@ VOID
MiniDisplayPacket( MiniDisplayPacket(
PNDIS_PACKET Packet) PNDIS_PACKET Packet)
{ {
#ifdef DBG #if DBG
ULONG i, Length; ULONG i, Length;
UCHAR Buffer[64]; UCHAR Buffer[64];
if ((DebugTraceLevel & DEBUG_PACKET) > 0) { if ((DebugTraceLevel & DEBUG_PACKET) > 0) {
@ -92,7 +92,7 @@ MiniDisplayPacket2(
PVOID LookaheadBuffer, PVOID LookaheadBuffer,
UINT LookaheadBufferSize) UINT LookaheadBufferSize)
{ {
#ifdef DBG #if DBG
if ((DebugTraceLevel & DEBUG_PACKET) > 0) { if ((DebugTraceLevel & DEBUG_PACKET) > 0) {
ULONG i, Length; ULONG i, Length;
PUCHAR p; PUCHAR p;
@ -520,7 +520,7 @@ MiniAdapterHasAddress(
NDIS_DbgPrint(DEBUG_MINIPORT, ("Called.\n")); NDIS_DbgPrint(DEBUG_MINIPORT, ("Called.\n"));
#ifdef DBG #if DBG
if(!Adapter) if(!Adapter)
{ {
NDIS_DbgPrint(MID_TRACE, ("Adapter object was null\n")); NDIS_DbgPrint(MID_TRACE, ("Adapter object was null\n"));
@ -1586,7 +1586,7 @@ DoQueries(
return NdisStatus; return NdisStatus;
} }
#ifdef DBG #if DBG
{ {
/* 802.3 only */ /* 802.3 only */

View file

@ -247,7 +247,7 @@ ProIndicatePacket(
NDIS_DbgPrint(MAX_TRACE, ("Called.\n")); NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
#ifdef DBG #if DBG
MiniDisplayPacket(Packet); MiniDisplayPacket(Packet);
#endif #endif

View file

@ -649,7 +649,7 @@ VOID LANTransmit(
EHeader->EType = ETYPE_IPv6; EHeader->EType = ETYPE_IPv6;
break; break;
default: default:
#ifdef DBG #if DBG
/* Should not happen */ /* Should not happen */
TI_DbgPrint(MIN_TRACE, ("Unknown LAN protocol.\n")); TI_DbgPrint(MIN_TRACE, ("Unknown LAN protocol.\n"));

View file

@ -20,7 +20,7 @@
(IPAddress)->Address.IPv4Address = (RawAddress); \ (IPAddress)->Address.IPv4Address = (RawAddress); \
} }
#ifdef DBG #if DBG
PCHAR A2S( PCHAR A2S(
PIP_ADDRESS Address); PIP_ADDRESS Address);

View file

@ -33,7 +33,7 @@
#define DEBUG_INFO 0x02000000 #define DEBUG_INFO 0x02000000
#define DEBUG_ULTRA 0x7FFFFFFF #define DEBUG_ULTRA 0x7FFFFFFF
#ifdef DBG #if DBG
#define REMOVE_PARENS(...) __VA_ARGS__ #define REMOVE_PARENS(...) __VA_ARGS__
#define TI_DbgPrint(_t_, _x_) \ #define TI_DbgPrint(_t_, _x_) \

View file

@ -15,7 +15,7 @@
#define AllocatePacketWithBuffer(x,y,z) AllocatePacketWithBufferX(x,y,z,__FILE__,__LINE__) #define AllocatePacketWithBuffer(x,y,z) AllocatePacketWithBufferX(x,y,z,__FILE__,__LINE__)
#define FreeNdisPacket(x) FreeNdisPacketX(x,__FILE__,__LINE__) #define FreeNdisPacket(x) FreeNdisPacketX(x,__FILE__,__LINE__)
#ifdef DBG #if DBG
#define MTMARK() TrackDumpFL(__FILE__, __LINE__) #define MTMARK() TrackDumpFL(__FILE__, __LINE__)
#define exAllocatePool(x,y) ExAllocatePoolX(x,y,__FILE__,__LINE__) #define exAllocatePool(x,y) ExAllocatePoolX(x,y,__FILE__,__LINE__)
#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolX(x,y,__FILE__,__LINE__) #define exAllocatePoolWithTag(x,y,z) ExAllocatePoolX(x,y,__FILE__,__LINE__)

View file

@ -58,7 +58,7 @@ void GetDataPtr( PNDIS_PACKET Packet,
PCHAR *DataOut, PCHAR *DataOut,
PUINT Size ); PUINT Size );
#ifdef DBG #if DBG
VOID DisplayIPPacket( VOID DisplayIPPacket(
PIP_PACKET IPPacket); PIP_PACKET IPPacket);
#define DISPLAY_IP_PACKET(x) DisplayIPPacket(x) #define DISPLAY_IP_PACKET(x) DisplayIPPacket(x)

View file

@ -8,7 +8,7 @@
#define __TITYPES_H #define __TITYPES_H
#ifdef DBG #if DBG
#define DEFINE_TAG ULONG Tag; #define DEFINE_TAG ULONG Tag;
#define INIT_TAG(_Object, _Tag) \ #define INIT_TAG(_Object, _Tag) \

View file

@ -164,7 +164,7 @@ VOID NTAPI DispCancelRequest(
Irp->IoStatus.Status = STATUS_CANCELLED; Irp->IoStatus.Status = STATUS_CANCELLED;
Irp->IoStatus.Information = 0; Irp->IoStatus.Information = 0;
#ifdef DBG #if DBG
if (!Irp->Cancel) if (!Irp->Cancel)
TI_DbgPrint(MIN_TRACE, ("Irp->Cancel is FALSE, should be TRUE.\n")); TI_DbgPrint(MIN_TRACE, ("Irp->Cancel is FALSE, should be TRUE.\n"));
#endif #endif
@ -243,7 +243,7 @@ VOID NTAPI DispCancelListenRequest(
TI_DbgPrint(DEBUG_IRP, ("IRP at (0x%X).\n", Irp)); TI_DbgPrint(DEBUG_IRP, ("IRP at (0x%X).\n", Irp));
#ifdef DBG #if DBG
if (!Irp->Cancel) if (!Irp->Cancel)
TI_DbgPrint(MIN_TRACE, ("Irp->Cancel is FALSE, should be TRUE.\n")); TI_DbgPrint(MIN_TRACE, ("Irp->Cancel is FALSE, should be TRUE.\n"));
#endif #endif

View file

@ -622,7 +622,7 @@ VOID NTAPI TiUnload(
* DriverObject = Pointer to driver object created by the system * DriverObject = Pointer to driver object created by the system
*/ */
{ {
#ifdef DBG #if DBG
KIRQL OldIrql; KIRQL OldIrql;
TcpipAcquireSpinLock(&AddressFileListLock, &OldIrql); TcpipAcquireSpinLock(&AddressFileListLock, &OldIrql);

View file

@ -126,7 +126,7 @@ typedef struct _CDROM_DATA {
UCHAR MediaChangeCountDown; UCHAR MediaChangeCountDown;
#ifdef DBG #if DBG
// //
// Second timer to keep track of how long the media change IRP has been // Second timer to keep track of how long the media change IRP has been
// in use. If this value exceeds the timeout (#defined) then we should // in use. If this value exceeds the timeout (#defined) then we should
@ -176,7 +176,7 @@ typedef struct _CDROM_DATA {
#define CDROM_SRB_LIST_SIZE 4 #define CDROM_SRB_LIST_SIZE 4
#ifdef DBG #if DBG
// //
// Used to detect the loss of the autorun irp. The driver prints out a message // Used to detect the loss of the autorun irp. The driver prints out a message
@ -984,7 +984,7 @@ Return Value:
deviceExtension->MediaChangeNoMedia = TRUE; deviceExtension->MediaChangeNoMedia = TRUE;
cddata->MediaChangeIrp = NULL; cddata->MediaChangeIrp = NULL;
#ifdef DBG #if DBG
cddata->MediaChangeIrpTimeInUse = 0; cddata->MediaChangeIrpTimeInUse = 0;
cddata->MediaChangeIrpLost = FALSE; cddata->MediaChangeIrpLost = FALSE;
#endif #endif
@ -5746,7 +5746,7 @@ Return Value:
cddata->MediaChangeCountDown--; cddata->MediaChangeCountDown--;
#ifdef DBG #if DBG
cddata->MediaChangeIrpTimeInUse = 0; cddata->MediaChangeIrpTimeInUse = 0;
cddata->MediaChangeIrpLost = FALSE; cddata->MediaChangeIrpLost = FALSE;
#endif #endif
@ -5833,7 +5833,7 @@ Return Value:
} }
} else { } else {
#ifdef DBG #if DBG
if(cddata->MediaChangeIrpLost == FALSE) { if(cddata->MediaChangeIrpLost == FALSE) {
if(cddata->MediaChangeIrpTimeInUse++ > if(cddata->MediaChangeIrpTimeInUse++ >
MEDIA_CHANGE_TIMEOUT_TIME) { MEDIA_CHANGE_TIMEOUT_TIME) {

View file

@ -3077,7 +3077,7 @@ AtapiCallBack__(
goto ReturnCallback; goto ReturnCallback;
} }
#ifdef DBG #if DBG
if (!IS_RDP((srb->Cdb[0]))) { if (!IS_RDP((srb->Cdb[0]))) {
KdPrint2((PRINT_PREFIX "AtapiCallBack: Invalid CDB marked as RDP - %#x\n", srb->Cdb[0])); KdPrint2((PRINT_PREFIX "AtapiCallBack: Invalid CDB marked as RDP - %#x\n", srb->Cdb[0]));
} }

View file

@ -6060,7 +6060,7 @@ ehci_isr(PKINTERRUPT interrupt, PVOID context)
PEHCI_DEV ehci; PEHCI_DEV ehci;
ULONG status; ULONG status;
#ifdef DBG #if DBG
ULONG urb_count; ULONG urb_count;
#endif #endif
PLIST_ENTRY pthis, pnext; PLIST_ENTRY pthis, pnext;
@ -6116,7 +6116,7 @@ ehci_isr(PKINTERRUPT interrupt, PVOID context)
door_bell_rings = ((status & STS_IAA) != 0); door_bell_rings = ((status & STS_IAA) != 0);
// scan to remove those due // scan to remove those due
#ifdef DBG #if DBG
urb_count = dbg_count_list(&ehci->urb_list); urb_count = dbg_count_list(&ehci->urb_list);
ehci_dbg_print(DBGLVL_MAXIMUM, ("ehci_isr(): urb# in process is %d\n", urb_count)); ehci_dbg_print(DBGLVL_MAXIMUM, ("ehci_isr(): urb# in process is %d\n", urb_count));
#endif #endif

View file

@ -41,7 +41,7 @@ extern "C" {
#undef DebugPrint #undef DebugPrint
#endif #endif
#ifdef DBG #if DBG
#define DebugPrint(x) ChangerClassDebugPrint x #define DebugPrint(x) ChangerClassDebugPrint x
#else #else
#define DebugPrint(x) #define DebugPrint(x)

View file

@ -33,7 +33,7 @@ extern "C" {
#define SCSIPORTAPI DECLSPEC_IMPORT #define SCSIPORTAPI DECLSPEC_IMPORT
#endif #endif
#ifdef DBG #if DBG
#define DebugPrint(x) ScsiDebugPrint x #define DebugPrint(x) ScsiDebugPrint x
#else #else
#define DebugPrint(x) #define DebugPrint(x)
@ -56,7 +56,7 @@ typedef PHYSICAL_ADDRESS SCSI_PHYSICAL_ADDRESS, *PSCSI_PHYSICAL_ADDRESS;
#define MAXIMUM_CDB_SIZE 12 #define MAXIMUM_CDB_SIZE 12
#ifdef DBG #if DBG
#define SCSI_PORT_SIGNATURE 0x54524f50 #define SCSI_PORT_SIGNATURE 0x54524f50
#endif #endif

View file

@ -404,7 +404,7 @@ StorPortSynchronizeAccess(
IN PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine, IN PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine,
IN PVOID Context); IN PVOID Context);
#ifdef DBG #if DBG
#define DebugPrint(x) StorPortDebugPrint x #define DebugPrint(x) StorPortDebugPrint x
#else #else
#define DebugPrint(x) #define DebugPrint(x)

View file

@ -86,7 +86,7 @@ typedef HW_DMA_RETURN
#undef PAGED_CODE #undef PAGED_CODE
#endif #endif
#ifdef DBG #if DBG
#define PAGED_CODE() \ #define PAGED_CODE() \
if (VideoPortGetCurrentIrql() > 1 /* APC_LEVEL */) \ if (VideoPortGetCurrentIrql() > 1 /* APC_LEVEL */) \
@ -1540,7 +1540,7 @@ VideoPortZeroMemory(
IN PVOID Destination, IN PVOID Destination,
IN ULONG Length); IN ULONG Length);
#ifdef DBG #if DBG
#define VideoDebugPrint(x) VideoPortDebugPrint x #define VideoDebugPrint(x) VideoPortDebugPrint x
#else #else
#define VideoDebugPrint(x) #define VideoDebugPrint(x)

View file

@ -4256,7 +4256,7 @@ typedef struct _IO_REMOVE_LOCK_DBG_BLOCK {
typedef struct _IO_REMOVE_LOCK { typedef struct _IO_REMOVE_LOCK {
IO_REMOVE_LOCK_COMMON_BLOCK Common; IO_REMOVE_LOCK_COMMON_BLOCK Common;
#ifdef DBG #if DBG
IO_REMOVE_LOCK_DBG_BLOCK Dbg; IO_REMOVE_LOCK_DBG_BLOCK Dbg;
#endif #endif
} IO_REMOVE_LOCK, *PIO_REMOVE_LOCK; } IO_REMOVE_LOCK, *PIO_REMOVE_LOCK;
@ -5753,7 +5753,7 @@ KeAcquireSpinLockRaiseToDpc(
#define ROUND_TO_PAGES(Size) \ #define ROUND_TO_PAGES(Size) \
((ULONG_PTR) (((ULONG_PTR) Size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))) ((ULONG_PTR) (((ULONG_PTR) Size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)))
#ifdef DBG #if DBG
#define ASSERT(exp) \ #define ASSERT(exp) \
(VOID)((!(exp)) ? \ (VOID)((!(exp)) ? \
@ -6273,7 +6273,7 @@ ExUuidCreate(
#define ExReleaseResourceForThread ExReleaseResourceForThreadLite #define ExReleaseResourceForThread ExReleaseResourceForThreadLite
#ifdef DBG #if DBG
#define PAGED_CODE() { \ #define PAGED_CODE() { \
if (KeGetCurrentIrql() > APC_LEVEL) { \ if (KeGetCurrentIrql() > APC_LEVEL) { \
@ -10267,7 +10267,7 @@ DbgSetDebugFilterState(
IN ULONG Level, IN ULONG Level,
IN BOOLEAN State); IN BOOLEAN State);
#ifdef DBG #if DBG
#define KdPrint(_x_) DbgPrint _x_ #define KdPrint(_x_) DbgPrint _x_
#define KdPrintEx(_x_) DbgPrintEx _x_ #define KdPrintEx(_x_) DbgPrintEx _x_

View file

@ -78,7 +78,7 @@ RtlAssert(
/* Print stuff only on Debug Builds*/ /* Print stuff only on Debug Builds*/
#define DPFLTR_DEFAULT_ID -1 #define DPFLTR_DEFAULT_ID -1
#ifdef DBG #if DBG
/* These are always printed */ /* These are always printed */
#define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint #define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint

View file

@ -179,7 +179,7 @@ PIP_INTERFACE IPCreateInterface(
TI_DbgPrint(DEBUG_IP, ("Called. BindInfo (0x%X).\n", BindInfo)); TI_DbgPrint(DEBUG_IP, ("Called. BindInfo (0x%X).\n", BindInfo));
#ifdef DBG #if DBG
if (BindInfo->Address) { if (BindInfo->Address) {
PUCHAR A = BindInfo->Address; PUCHAR A = BindInfo->Address;
TI_DbgPrint(DEBUG_IP, ("Interface address (%02X %02X %02X %02X %02X %02X).\n", TI_DbgPrint(DEBUG_IP, ("Interface address (%02X %02X %02X %02X %02X %02X).\n",

View file

@ -2,7 +2,7 @@
#include "precomp.h" #include "precomp.h"
#ifdef DBG #if DBG
#define TRACK_TAG TAG('T','r','C','K') #define TRACK_TAG TAG('T','r','C','K')
static LIST_ENTRY AllocatedObjectsList; static LIST_ENTRY AllocatedObjectsList;

View file

@ -26,7 +26,7 @@ UINT Random(
return RandomNumber; return RandomNumber;
} }
#ifdef DBG #if DBG
static VOID DisplayIPHeader( static VOID DisplayIPHeader(
PCHAR Header, PCHAR Header,
UINT Length) UINT Length)
@ -131,7 +131,7 @@ VOID DisplayTCPPacket(
VOID DisplayIPPacket( VOID DisplayIPPacket(
PIP_PACKET IPPacket) PIP_PACKET IPPacket)
{ {
#ifdef DBG #if DBG
PCHAR p; PCHAR p;
UINT Length; UINT Length;
PNDIS_BUFFER Buffer; PNDIS_BUFFER Buffer;

View file

@ -8,7 +8,7 @@
#define FBSD_MALLOC FOURCC('d','s','b','f') #define FBSD_MALLOC FOURCC('d','s','b','f')
#define EXALLOC_TAG FOURCC('E','x','A','l') #define EXALLOC_TAG FOURCC('E','x','A','l')
#ifdef DBG #if DBG
#define MTMARK() TrackDumpFL(__FILE__, __LINE__) #define MTMARK() TrackDumpFL(__FILE__, __LINE__)
#define NdisAllocateBuffer(x,y,z,a,b) { \ #define NdisAllocateBuffer(x,y,z,a,b) { \
NdisAllocateBuffer(x,y,z,a,b); \ NdisAllocateBuffer(x,y,z,a,b); \

View file

@ -35,7 +35,7 @@
#include <oskittypes.h> #include <oskittypes.h>
#ifdef DBG #if DBG
extern OSK_UINT OskitDebugTraceLevel; extern OSK_UINT OskitDebugTraceLevel;

View file

@ -125,7 +125,7 @@ BOOLEAN NTAPI
RtlFreeHandle(PRTL_HANDLE_TABLE HandleTable, RtlFreeHandle(PRTL_HANDLE_TABLE HandleTable,
PRTL_HANDLE_TABLE_ENTRY Handle) PRTL_HANDLE_TABLE_ENTRY Handle)
{ {
#ifdef DBG #if DBG
/* check if handle is valid */ /* check if handle is valid */
if (!RtlIsValidHandle(HandleTable, Handle)) if (!RtlIsValidHandle(HandleTable, Handle))
{ {

View file

@ -9,7 +9,7 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
/* PAGED_CODE equivalent for user-mode RTL */ /* PAGED_CODE equivalent for user-mode RTL */
#ifdef DBG #if DBG
extern VOID FASTCALL CHECK_PAGED_CODE_RTL(char *file, int line); extern VOID FASTCALL CHECK_PAGED_CODE_RTL(char *file, int line);
#define PAGED_CODE_RTL() CHECK_PAGED_CODE_RTL(__FILE__, __LINE__) #define PAGED_CODE_RTL() CHECK_PAGED_CODE_RTL(__FILE__, __LINE__)
#else #else

View file

@ -79,7 +79,7 @@ void* _alloca(size_t size);
#error Unknown compiler for alloca intrinsic stack allocation "function" #error Unknown compiler for alloca intrinsic stack allocation "function"
#endif #endif
#if defined(DBG) || defined(KDBG) #if DBG || defined(KDBG)
static void CcRosCacheSegmentIncRefCount_ ( PCACHE_SEGMENT cs, const char* file, int line ) static void CcRosCacheSegmentIncRefCount_ ( PCACHE_SEGMENT cs, const char* file, int line )
{ {
++cs->ReferenceCount; ++cs->ReferenceCount;
@ -117,7 +117,7 @@ CcRosTraceCacheMap (
PBCB Bcb, PBCB Bcb,
BOOLEAN Trace ) BOOLEAN Trace )
{ {
#if defined(DBG) || defined(KDBG) #if DBG || defined(KDBG)
KIRQL oldirql; KIRQL oldirql;
PLIST_ENTRY current_entry; PLIST_ENTRY current_entry;
PCACHE_SEGMENT current; PCACHE_SEGMENT current;
@ -596,7 +596,7 @@ CcRosCreateCacheSegment(PBCB Bcb,
current->PageOut = FALSE; current->PageOut = FALSE;
current->FileOffset = ROUND_DOWN(FileOffset, Bcb->CacheSegmentSize); current->FileOffset = ROUND_DOWN(FileOffset, Bcb->CacheSegmentSize);
current->Bcb = Bcb; current->Bcb = Bcb;
#if defined(DBG) || defined(KDBG) #if DBG || defined(KDBG)
if ( Bcb->Trace ) if ( Bcb->Trace )
{ {
DPRINT1("CacheMap 0x%p: new Cache Segment: 0x%p\n", Bcb, current ); DPRINT1("CacheMap 0x%p: new Cache Segment: 0x%p\n", Bcb, current );
@ -628,7 +628,7 @@ CcRosCreateCacheSegment(PBCB Bcb,
{ {
CcRosCacheSegmentIncRefCount(current); CcRosCacheSegmentIncRefCount(current);
KeReleaseSpinLock(&Bcb->BcbLock, oldIrql); KeReleaseSpinLock(&Bcb->BcbLock, oldIrql);
#if defined(DBG) || defined(KDBG) #if DBG || defined(KDBG)
if ( Bcb->Trace ) if ( Bcb->Trace )
{ {
DPRINT1("CacheMap 0x%p: deleting newly created Cache Segment 0x%p ( found existing one 0x%p )\n", DPRINT1("CacheMap 0x%p: deleting newly created Cache Segment 0x%p ( found existing one 0x%p )\n",
@ -881,7 +881,7 @@ CcRosInternalFreeCacheSegment(PCACHE_SEGMENT CacheSeg)
KIRQL oldIrql; KIRQL oldIrql;
#endif #endif
DPRINT("Freeing cache segment 0x%p\n", CacheSeg); DPRINT("Freeing cache segment 0x%p\n", CacheSeg);
#if defined(DBG) || defined(KDBG) #if DBG || defined(KDBG)
if ( CacheSeg->Bcb->Trace ) if ( CacheSeg->Bcb->Trace )
{ {
DPRINT1("CacheMap 0x%p: deleting Cache Segment: 0x%p\n", CacheSeg->Bcb, CacheSeg ); DPRINT1("CacheMap 0x%p: deleting Cache Segment: 0x%p\n", CacheSeg->Bcb, CacheSeg );
@ -1081,7 +1081,7 @@ CcRosDeleteFileCache(PFILE_OBJECT FileObject, PBCB Bcb)
} }
InsertHeadList(&FreeList, &current->BcbSegmentListEntry); InsertHeadList(&FreeList, &current->BcbSegmentListEntry);
} }
#if defined(DBG) || defined(KDBG) #if DBG || defined(KDBG)
Bcb->Trace = FALSE; Bcb->Trace = FALSE;
#endif #endif
KeReleaseSpinLock(&Bcb->BcbLock, oldIrql); KeReleaseSpinLock(&Bcb->BcbLock, oldIrql);

View file

@ -461,7 +461,7 @@ _ExInterlockedDecrementLong@8:
/*ULONG /*ULONG
*NTAPI *NTAPI
*ExInterlockedExchangeUlong(IN PULONG Taget, *ExInterlockedExchangeUlong(IN PULONG Target,
* IN ULONG Value, * IN ULONG Value,
* IN PKSPIN_LOCK Lock) * IN PKSPIN_LOCK Lock)
*/ */
@ -529,7 +529,7 @@ _Exi386InterlockedDecrementLong@4:
/*ULONG /*ULONG
*NTAPI *NTAPI
*Exi386InterlockedExchangeUlong(IN PULONG Taget, *Exi386InterlockedExchangeUlong(IN PULONG Target,
* IN ULONG Value, * IN ULONG Value,
* IN PKSPIN_LOCK Lock) * IN PKSPIN_LOCK Lock)
*/ */

View file

@ -182,7 +182,7 @@ ExfWakePushLock(PEX_PUSH_LOCK PushLock,
/* Sanity check */ /* Sanity check */
ASSERT(!WaitBlock->Signaled); ASSERT(!WaitBlock->Signaled);
#ifdef DBG #if DBG
/* We are about to get signaled */ /* We are about to get signaled */
WaitBlock->Signaled = TRUE; WaitBlock->Signaled = TRUE;
#endif #endif

View file

@ -18,7 +18,7 @@
#define IsOwnedExclusive(r) (r->Flag & ResourceOwnedExclusive) #define IsOwnedExclusive(r) (r->Flag & ResourceOwnedExclusive)
#define IsBoostAllowed(r) (!(r->Flag & ResourceHasDisabledPriorityBoost)) #define IsBoostAllowed(r) (!(r->Flag & ResourceHasDisabledPriorityBoost))
#if (!(defined(CONFIG_SMP)) && !(defined(DBG))) #if (!(defined(CONFIG_SMP)) && !(DBG))
FORCEINLINE FORCEINLINE
VOID VOID

View file

@ -16,7 +16,7 @@
/********** mm/ppool.c **********/ /********** mm/ppool.c **********/
/* Disable Debugging Features */ /* Disable Debugging Features */
#ifndef DBG #if !DBG
/* Enable strict checking of the nonpaged pool on every allocation */ /* Enable strict checking of the nonpaged pool on every allocation */
#undef ENABLE_VALIDATE_POOL #undef ENABLE_VALIDATE_POOL

View file

@ -116,7 +116,7 @@ typedef struct _BCB
PVOID LazyWriteContext; PVOID LazyWriteContext;
KSPIN_LOCK BcbLock; KSPIN_LOCK BcbLock;
ULONG RefCount; ULONG RefCount;
#if defined(DBG) || defined(KDBG) #if DBG || defined(KDBG)
BOOLEAN Trace; /* enable extra trace output for this BCB and it's cache segments */ BOOLEAN Trace; /* enable extra trace output for this BCB and it's cache segments */
#endif #endif
} BCB, *PBCB; } BCB, *PBCB;

View file

@ -997,7 +997,7 @@ PendingUserApc:
// @remark // @remark
// //
.macro TRAP_EPILOG SystemCall, RestorePreviousMode, RestoreSegments, RestoreVolatiles, RestoreAllRegs .macro TRAP_EPILOG SystemCall, RestorePreviousMode, RestoreSegments, RestoreVolatiles, RestoreAllRegs
#ifdef DBG #if DBG
/* Assert the flags */ /* Assert the flags */
pushfd pushfd
pop edx pop edx
@ -1011,7 +1011,7 @@ PendingUserApc:
/* Assert the trap frame */ /* Assert the trap frame */
#endif #endif
5: 5:
#ifdef DBG #if DBG
sub dword ptr [esp+KTRAP_FRAME_DEBUGARGMARK], 0xBADB0D00 sub dword ptr [esp+KTRAP_FRAME_DEBUGARGMARK], 0xBADB0D00
jnz 0f jnz 0f
@ -1033,7 +1033,7 @@ PendingUserApc:
/* Get exception list */ /* Get exception list */
mov edx, [esp+KTRAP_FRAME_EXCEPTION_LIST] mov edx, [esp+KTRAP_FRAME_EXCEPTION_LIST]
#ifdef DBG #if DBG
/* Assert the saved exception list */ /* Assert the saved exception list */
or edx, edx or edx, edx
jnz 1f jnz 1f
@ -1048,7 +1048,7 @@ PendingUserApc:
/* Get previous mode */ /* Get previous mode */
mov ecx, [esp+KTRAP_FRAME_PREVIOUS_MODE] mov ecx, [esp+KTRAP_FRAME_PREVIOUS_MODE]
#ifdef DBG #if DBG
/* Assert the saved previous mode */ /* Assert the saved previous mode */
cmp ecx, -1 cmp ecx, -1
jnz 1f jnz 1f
@ -1061,7 +1061,7 @@ PendingUserApc:
mov byte ptr [esi+KTHREAD_PREVIOUS_MODE], cl mov byte ptr [esi+KTHREAD_PREVIOUS_MODE], cl
.else .else
#ifdef DBG #if DBG
/* Assert the saved previous mode */ /* Assert the saved previous mode */
mov ecx, [esp+KTRAP_FRAME_PREVIOUS_MODE] mov ecx, [esp+KTRAP_FRAME_PREVIOUS_MODE]
cmp ecx, -1 cmp ecx, -1
@ -1304,7 +1304,7 @@ FastExit:
.endif .endif
.endm .endm
#ifdef DBG #if DBG
.macro VERIFY_INT Label .macro VERIFY_INT Label
/* Get the current time and mask it to 192 ticks */ /* Get the current time and mask it to 192 ticks */

View file

@ -66,7 +66,7 @@ KdPortPutByteEx(
/* SYMBOL ROUTINES **********************************************************/ /* SYMBOL ROUTINES **********************************************************/
#ifdef __NTOSKRNL__ #ifdef __NTOSKRNL__
#if defined(KDBG) || defined(DBG) #if defined(KDBG) || DBG
VOID VOID
KdbSymLoadUserModuleSymbols(IN PLDR_DATA_TABLE_ENTRY LdrModule); KdbSymLoadUserModuleSymbols(IN PLDR_DATA_TABLE_ENTRY LdrModule);
@ -128,7 +128,7 @@ typedef struct _KDB_MODULE_INFO
# define KDB_CREATE_THREAD_HOOK(CONTEXT) do { } while (0) # define KDB_CREATE_THREAD_HOOK(CONTEXT) do { } while (0)
#endif #endif
#if defined(KDBG) || defined(DBG) #if defined(KDBG) || DBG
# define KeRosPrintAddress(ADDRESS) KdbSymPrintAddress(ADDRESS) # define KeRosPrintAddress(ADDRESS) KdbSymPrintAddress(ADDRESS)
#else #else
# define KeRosPrintAddress(ADDRESS) KiRosPrintAddress(ADDRESS) # define KeRosPrintAddress(ADDRESS) KiRosPrintAddress(ADDRESS)

View file

@ -445,7 +445,7 @@ KxAcquireSpinLock(IN PKSPIN_LOCK SpinLock)
/* Value changed... wait until it's locked */ /* Value changed... wait until it's locked */
while (*(volatile KSPIN_LOCK *)SpinLock == 1) while (*(volatile KSPIN_LOCK *)SpinLock == 1)
{ {
#ifdef DBG #if DBG
/* On debug builds, we use a much slower but useful routine */ /* On debug builds, we use a much slower but useful routine */
//Kii386SpinOnSpinLock(SpinLock, 5); //Kii386SpinOnSpinLock(SpinLock, 5);
@ -459,7 +459,7 @@ KxAcquireSpinLock(IN PKSPIN_LOCK SpinLock)
} }
else else
{ {
#ifdef DBG #if DBG
/* On debug builds, we OR in the KTHREAD */ /* On debug builds, we OR in the KTHREAD */
*SpinLock = (KSPIN_LOCK)KeGetCurrentThread() | 1; *SpinLock = (KSPIN_LOCK)KeGetCurrentThread() | 1;
#endif #endif
@ -476,7 +476,7 @@ FORCEINLINE
VOID VOID
KxReleaseSpinLock(IN PKSPIN_LOCK SpinLock) KxReleaseSpinLock(IN PKSPIN_LOCK SpinLock)
{ {
#ifdef DBG #if DBG
/* Make sure that the threads match */ /* Make sure that the threads match */
if (((KSPIN_LOCK)KeGetCurrentThread() | 1) != *SpinLock) if (((KSPIN_LOCK)KeGetCurrentThread() | 1) != *SpinLock)
{ {

View file

@ -49,7 +49,7 @@ KdpServiceDispatcher(ULONG Service,
Result = KdpPrintString(Buffer1, Buffer1Length); Result = KdpPrintString(Buffer1, Buffer1Length);
break; break;
#ifdef DBG #if DBG
case TAG('R', 'o', 's', ' '): /* ROS-INTERNAL */ case TAG('R', 'o', 's', ' '): /* ROS-INTERNAL */
{ {
switch ((ULONG)Buffer1) switch ((ULONG)Buffer1)

View file

@ -694,7 +694,7 @@ KdbInitialize(PKD_DISPATCH_TABLE DispatchTable,
LoadSymbols = FALSE; LoadSymbols = FALSE;
#ifdef DBG #if DBG
/* Load symbols only if we have 96Mb of RAM or more */ /* Load symbols only if we have 96Mb of RAM or more */
if (MmNumberOfPhysicalPages >= 0x6000) if (MmNumberOfPhysicalPages >= 0x6000)
LoadSymbols = TRUE; LoadSymbols = TRUE;

View file

@ -65,7 +65,7 @@ KiInitializeKernel(IN PKPROCESS InitProcess,
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
Prcb->BuildType |= PRCB_BUILD_UNIPROCESSOR; Prcb->BuildType |= PRCB_BUILD_UNIPROCESSOR;
#endif #endif
#ifdef DBG #if DBG
Prcb->BuildType |= PRCB_BUILD_DEBUG; Prcb->BuildType |= PRCB_BUILD_DEBUG;
#endif #endif
Prcb->CurrentThread = InitThread; Prcb->CurrentThread = InitThread;

View file

@ -140,7 +140,7 @@ _KiFlushNPXState@4:
cmp dword ptr [esp+20], 0 cmp dword ptr [esp+20], 0
je Return je Return
#ifdef DBG #if DBG
/* Assert Fxsr support */ /* Assert Fxsr support */
test byte ptr _KeI386FxsrPresent, 1 test byte ptr _KeI386FxsrPresent, 1
jnz AssertOk jnz AssertOk
@ -167,7 +167,7 @@ Cr0OK:
cmp byte ptr [eax+KTHREAD_NPX_STATE], NPX_STATE_NOT_LOADED cmp byte ptr [eax+KTHREAD_NPX_STATE], NPX_STATE_NOT_LOADED
jnz DontSave jnz DontSave
#ifdef DBG #if DBG
/* We are the NPX Thread with an unloaded NPX State... this isn't normal! */ /* We are the NPX Thread with an unloaded NPX State... this isn't normal! */
int 3 int 3
#endif #endif
@ -365,7 +365,7 @@ NotBusy:
AfterTrace: AfterTrace:
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#ifdef DBG #if DBG
/* Assert that we're on the right CPU */ /* Assert that we're on the right CPU */
mov cl, [esi+KTHREAD_NEXT_PROCESSOR] mov cl, [esi+KTHREAD_NEXT_PROCESSOR]
cmp cl, [ebx+KPCR_PROCESSOR_NUMBER] cmp cl, [ebx+KPCR_PROCESSOR_NUMBER]
@ -419,7 +419,7 @@ StackOk:
lock xor [eax+KPROCESS_ACTIVE_PROCESSORS], ecx lock xor [eax+KPROCESS_ACTIVE_PROCESSORS], ecx
/* Assert change went ok */ /* Assert change went ok */
#ifdef DBG #if DBG
test [ebp+KPROCESS_ACTIVE_PROCESSORS], ecx test [ebp+KPROCESS_ACTIVE_PROCESSORS], ecx
jz WrongActiveCpu jz WrongActiveCpu
test [eax+KPROCESS_ACTIVE_PROCESSORS], ecx test [eax+KPROCESS_ACTIVE_PROCESSORS], ecx
@ -548,7 +548,7 @@ LoadLdt:
NewCr0: NewCr0:
#ifdef DBG #if DBG
/* Assert NPX State */ /* Assert NPX State */
test byte ptr [esi+KTHREAD_NPX_STATE], ~(NPX_STATE_NOT_LOADED) test byte ptr [esi+KTHREAD_NPX_STATE], ~(NPX_STATE_NOT_LOADED)
jnz InvalidNpx jnz InvalidNpx
@ -589,7 +589,7 @@ BugCheckDpc:
push ATTEMPTED_SWITCH_FROM_DPC push ATTEMPTED_SWITCH_FROM_DPC
call _KeBugCheckEx@20 call _KeBugCheckEx@20
#ifdef DBG #if DBG
InvalidNpx: InvalidNpx:
int 3 int 3
WrongActiveCpu: WrongActiveCpu:
@ -836,7 +836,7 @@ _KiSwapProcess@8:
lock xor [eax+KPROCESS_ACTIVE_PROCESSORS], ecx lock xor [eax+KPROCESS_ACTIVE_PROCESSORS], ecx
/* Sanity check */ /* Sanity check */
#ifdef DBG #if DBG
test dword ptr [edx+KPROCESS_ACTIVE_PROCESSORS], 0 test dword ptr [edx+KPROCESS_ACTIVE_PROCESSORS], 0
jz WrongCpu1 jz WrongCpu1
test dword ptr [eax+KPROCESS_ACTIVE_PROCESSORS], 0 test dword ptr [eax+KPROCESS_ACTIVE_PROCESSORS], 0
@ -871,7 +871,7 @@ NewLdt:
/* FIXME: TODO */ /* FIXME: TODO */
int 3 int 3
#ifdef DBG #if DBG
WrongCpu1: WrongCpu1:
int 3 int 3
WrongCpu2: WrongCpu2:

View file

@ -351,7 +351,7 @@ KiInitializePcr(IN ULONG ProcessorNumber,
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
Pcr->PrcbData.BuildType |= PRCB_BUILD_UNIPROCESSOR; Pcr->PrcbData.BuildType |= PRCB_BUILD_UNIPROCESSOR;
#endif #endif
#ifdef DBG #if DBG
Pcr->PrcbData.BuildType |= PRCB_BUILD_DEBUG; Pcr->PrcbData.BuildType |= PRCB_BUILD_DEBUG;
#endif #endif

View file

@ -98,7 +98,7 @@ _KeUpdateRunTime@8:
/* At dispatch, increase DPC time */ /* At dispatch, increase DPC time */
inc dword ptr [eax+KPCR_PRCB_DPC_TIME] inc dword ptr [eax+KPCR_PRCB_DPC_TIME]
#ifdef DBG #if DBG
/* Update the DPC time */ /* Update the DPC time */
inc dword ptr [eax+KPCR_PRCB_DEBUG_DPC_TIME] inc dword ptr [eax+KPCR_PRCB_DEBUG_DPC_TIME]

View file

@ -200,7 +200,7 @@ NotWin32K:
/* Increase total syscall count */ /* Increase total syscall count */
inc dword ptr PCR[KPCR_SYSTEM_CALLS] inc dword ptr PCR[KPCR_SYSTEM_CALLS]
#ifdef DBG #if DBG
/* Increase per-syscall count */ /* Increase per-syscall count */
mov ecx, [edi+SERVICE_DESCRIPTOR_COUNT] mov ecx, [edi+SERVICE_DESCRIPTOR_COUNT]
jecxz NoCountTable jecxz NoCountTable
@ -239,7 +239,7 @@ CopyParams:
call ebx call ebx
AfterSysCall: AfterSysCall:
#ifdef DBG #if DBG
/* Make sure the user-mode call didn't return at elevated IRQL */ /* Make sure the user-mode call didn't return at elevated IRQL */
test byte ptr [ebp+KTRAP_FRAME_CS], MODE_MASK test byte ptr [ebp+KTRAP_FRAME_CS], MODE_MASK
jz SkipCheck jz SkipCheck
@ -377,7 +377,7 @@ BadStack:
push 0 push 0
jmp _KiTrap6 jmp _KiTrap6
#ifdef DBG #if DBG
InvalidIrql: InvalidIrql:
/* Save current IRQL */ /* Save current IRQL */
push PCR[KPCR_IRQL] push PCR[KPCR_IRQL]

View file

@ -189,7 +189,7 @@ KeTryToAcquireSpinLockAtDpcLevel(IN OUT PKSPIN_LOCK SpinLock)
return FALSE; return FALSE;
} }
#ifdef DBG #if DBG
/* On debug builds, we OR in the KTHREAD */ /* On debug builds, we OR in the KTHREAD */
*SpinLock = (ULONG_PTR)KeGetCurrentThread() | 1; *SpinLock = (ULONG_PTR)KeGetCurrentThread() | 1;
#endif #endif

View file

@ -24,7 +24,7 @@ typedef struct _MM_RMAP_ENTRY
struct _MM_RMAP_ENTRY* Next; struct _MM_RMAP_ENTRY* Next;
PEPROCESS Process; PEPROCESS Process;
PVOID Address; PVOID Address;
#ifdef DBG #if DBG
PVOID Caller; PVOID Caller;
#endif #endif
} }
@ -396,7 +396,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
} }
new_entry->Address = Address; new_entry->Address = Address;
new_entry->Process = (PEPROCESS)Process; new_entry->Process = (PEPROCESS)Process;
#ifdef DBG #if DBG
#ifdef __GNUC__ #ifdef __GNUC__
new_entry->Caller = __builtin_return_address(0); new_entry->Caller = __builtin_return_address(0);
#else #else
@ -416,7 +416,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
ExAcquireFastMutex(&RmapListLock); ExAcquireFastMutex(&RmapListLock);
current_entry = MmGetRmapListHeadPage(Page); current_entry = MmGetRmapListHeadPage(Page);
new_entry->Next = current_entry; new_entry->Next = current_entry;
#ifdef DBG #if DBG
while (current_entry) while (current_entry)
{ {
if (current_entry->Address == new_entry->Address && current_entry->Process == new_entry->Process) if (current_entry->Address == new_entry->Address && current_entry->Process == new_entry->Process)

View file

@ -249,7 +249,7 @@ RPoolRemoveFree ( PR_POOL pool, PR_FREE Item )
ASSERT ( pool->FirstFree == Item ); ASSERT ( pool->FirstFree == Item );
pool->FirstFree = Item->NextFree; pool->FirstFree = Item->NextFree;
} }
#ifdef DBG #if DBG
Item->NextFree = Item->PrevFree = (PR_FREE)(ULONG_PTR)0xDEADBEEF; Item->NextFree = Item->PrevFree = (PR_FREE)(ULONG_PTR)0xDEADBEEF;
#endif//DBG #endif//DBG
} }
@ -290,7 +290,7 @@ RFreeInit ( void* memory )
#endif//R_FREEMAGIC #endif//R_FREEMAGIC
block->Status = 0; block->Status = 0;
RFreeFillStack ( block ); RFreeFillStack ( block );
#ifdef DBG #if DBG
block->PrevFree = block->NextFree = (PR_FREE)(ULONG_PTR)0xDEADBEEF; block->PrevFree = block->NextFree = (PR_FREE)(ULONG_PTR)0xDEADBEEF;
#endif//DBG #endif//DBG
return block; return block;
@ -655,7 +655,7 @@ RiUsedInit ( PR_USED Block, rulong Tag )
//ASSERT_SIZE ( Block->Size ); //ASSERT_SIZE ( Block->Size );
// now add the block to the used block list // now add the block to the used block list
#ifdef DBG #if DBG
Block->NextUsed = (PR_USED)(ULONG_PTR)0xDEADBEEF; Block->NextUsed = (PR_USED)(ULONG_PTR)0xDEADBEEF;
#endif//R_USED_LIST #endif//R_USED_LIST
@ -673,7 +673,7 @@ RiUsedInitRedZone ( PR_USED Block, rulong UserSize )
Block->UserSize = UserSize; Block->UserSize = UserSize;
memset ( Addr - R_RZ, R_RZ_LOVALUE, R_RZ ); memset ( Addr - R_RZ, R_RZ_LOVALUE, R_RZ );
memset ( Addr + Block->UserSize, R_RZ_HIVALUE, R_RZ ); memset ( Addr + Block->UserSize, R_RZ_HIVALUE, R_RZ );
#ifdef DBG #if DBG
memset ( Addr, 0xCD, UserSize ); memset ( Addr, 0xCD, UserSize );
#endif//DBG #endif//DBG
} }

View file

@ -15,7 +15,7 @@
/* PRIVATE FUNCTIONS *********************************************************/ /* PRIVATE FUNCTIONS *********************************************************/
#ifdef DBG #if DBG
VOID VOID
NTAPI NTAPI
PspDumpThreads(BOOLEAN IncludeSystem) PspDumpThreads(BOOLEAN IncludeSystem)

View file

@ -159,7 +159,7 @@ RtlLeaveHeapLock(
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
#ifdef DBG #if DBG
VOID FASTCALL VOID FASTCALL
CHECK_PAGED_CODE_RTL(char *file, int line) CHECK_PAGED_CODE_RTL(char *file, int line)
{ {

View file

@ -64,7 +64,7 @@ static bool _ReadFileData(FILEHANDLE handle, void* buffer, ULONG size, PULONG by
#ifndef CAB_READ_ONLY #ifndef CAB_READ_ONLY
#if 0 #if 0
#ifdef DBG #if DBG
void DumpBuffer(void* Buffer, ULONG Size) void DumpBuffer(void* Buffer, ULONG Size)
{ {

View file

@ -48,8 +48,6 @@
/* Debugging */ /* Debugging */
#define DBG
#define NORMAL_MASK 0x000000FF #define NORMAL_MASK 0x000000FF
#define SPECIAL_MASK 0xFFFFFF00 #define SPECIAL_MASK 0xFFFFFF00
#define MIN_TRACE 0x00000001 #define MIN_TRACE 0x00000001
@ -58,7 +56,7 @@
#define DEBUG_MEMORY 0x00000100 #define DEBUG_MEMORY 0x00000100
#ifdef DBG #if DBG
extern ULONG DebugTraceLevel; extern ULONG DebugTraceLevel;

View file

@ -17,7 +17,7 @@
#include "cabman.h" #include "cabman.h"
#ifdef DBG #if DBG
ULONG DebugTraceLevel = MIN_TRACE; ULONG DebugTraceLevel = MIN_TRACE;
//ULONG DebugTraceLevel = MID_TRACE; //ULONG DebugTraceLevel = MID_TRACE;

View file

@ -12,7 +12,7 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#ifdef DBG #if DBG
#define trace printf #define trace printf
#else #else
#define trace if (0) printf #define trace if (0) printf