mirror of
https://github.com/reactos/reactos.git
synced 2024-12-05 01:13:31 +08:00
- 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:
parent
3d402751d4
commit
88e9b2a513
@ -19,6 +19,10 @@
|
||||
<define name="_SEH_ENABLE_TRACE" />
|
||||
<property name="DBG_OR_KDBG" value="true" />
|
||||
</if>
|
||||
<if property="DBG" value="0">
|
||||
<define name="DBG">0</define>
|
||||
</if>
|
||||
|
||||
<if property="KDBG" value="1">
|
||||
<define name="KDBG">1</define>
|
||||
<property name="DBG_OR_KDBG" value="true" />
|
||||
|
@ -11,6 +11,10 @@
|
||||
<define name="_SEH_ENABLE_TRACE" />
|
||||
<property name="DBG_OR_KDBG" value="true" />
|
||||
</if>
|
||||
<if property="DBG" value="0">
|
||||
<define name="DBG">0</define>
|
||||
</if>
|
||||
|
||||
<if property="KDBG" value="1">
|
||||
<define name="KDBG">1</define>
|
||||
<property name="DBG_OR_KDBG" value="true" />
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define DEBUG_ADAPTER 0x00000100
|
||||
#define DEBUG_ULTRA 0xFFFFFFFF
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern unsigned long debug_trace_level;
|
||||
|
||||
|
@ -43,7 +43,7 @@ CreateCommonFreeLoaderSections(PINICACHE IniCache)
|
||||
IniSection = IniCacheAppendSection(IniCache,
|
||||
L"FREELOADER");
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (IsUnattendedSetup)
|
||||
{
|
||||
/* DefaultOS=ReactOS */
|
||||
@ -64,7 +64,7 @@ CreateCommonFreeLoaderSections(PINICACHE IniCache)
|
||||
L"ReactOS");
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (IsUnattendedSetup)
|
||||
#endif
|
||||
{
|
||||
@ -75,7 +75,7 @@ CreateCommonFreeLoaderSections(PINICACHE IniCache)
|
||||
L"TimeOut",
|
||||
L"0");
|
||||
}
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
else
|
||||
{
|
||||
/* Timeout=0 or 10 */
|
||||
@ -380,7 +380,7 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath,
|
||||
L"ReactOS_Debug",
|
||||
L"\"ReactOS (Debug)\"");
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* ReactOS_KdSerial="ReactOS (RosDbg)" */
|
||||
IniCacheInsertKey(IniSection,
|
||||
NULL,
|
||||
@ -453,7 +453,7 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath,
|
||||
L"Options",
|
||||
L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS");
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
/* Create "ReactOS_KdSerial" section */
|
||||
IniSection = IniCacheAppendSection(IniCache,
|
||||
|
@ -34,7 +34,7 @@ BOOL ScmShutdown = FALSE;
|
||||
VOID
|
||||
PrintString(LPCSTR fmt, ...)
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
CHAR buffer[512];
|
||||
va_list ap;
|
||||
|
||||
|
@ -163,7 +163,7 @@ BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT B
|
||||
|
||||
memcpy(Buffer, Ptr, BufferSize);
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
DPRINTM(DPRINT_DISK, "size of buffer: %x\n", Ptr[0]);
|
||||
DPRINTM(DPRINT_DISK, "information flags: %x\n", Ptr[1]);
|
||||
DPRINTM(DPRINT_DISK, "number of physical cylinders on drive: %u\n", *(PULONG)&Ptr[2]);
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/* MACROS *******************************************************************/
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
#define DEFAULT_BAUD_RATE 19200
|
||||
|
||||
@ -275,11 +275,11 @@ VOID Rs232PortPutByte(UCHAR ByteToSend)
|
||||
WRITE_PORT_UCHAR (SER_THR(Rs232PortBase), ByteToSend);
|
||||
}
|
||||
|
||||
#endif /* defined DBG */
|
||||
#endif /* DBG */
|
||||
|
||||
BOOLEAN Rs232PortInUse(ULONG Base)
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
return PortInitialized && Rs232PortBase == (PUCHAR)(ULONG_PTR)Base ? TRUE : FALSE;
|
||||
#else
|
||||
return FALSE;
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
//#define DEBUG_ALL
|
||||
//#define DEBUG_INIFILE
|
||||
@ -297,7 +297,7 @@ ULONG DbgPrint(PCCH Format, ...)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // defined DBG
|
||||
#endif // DBG
|
||||
|
||||
ULONG
|
||||
MsgBoxPrint(const char *Format, ...)
|
||||
|
@ -427,7 +427,7 @@ static BOOLEAN NtfsReadMftRecord(ULONG MFTIndex, PNTFS_MFT_RECORD Buffer)
|
||||
return NtfsFixupRecord((PNTFS_RECORD)Buffer);
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
VOID NtfsPrintFile(PNTFS_INDEX_ENTRY IndexEntry)
|
||||
{
|
||||
PWCHAR FileName;
|
||||
@ -455,7 +455,7 @@ static BOOLEAN NtfsCompareFileName(PCHAR FileName, PNTFS_INDEX_ENTRY IndexEntry)
|
||||
EntryFileName = IndexEntry->FileName.FileName;
|
||||
EntryFileNameLength = IndexEntry->FileName.FileNameLength;
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
NtfsPrintFile(IndexEntry);
|
||||
#endif
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
extern char* g_file;
|
||||
extern int g_line;
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
VOID DbgPrintMask(ULONG Mask, char *format, ...);
|
||||
VOID DebugInit(VOID);
|
||||
@ -85,6 +85,6 @@ void MEMORY_WRITE_BREAKPOINT4(unsigned long addr);
|
||||
#define BugCheck(_x_)
|
||||
#define DbgDumpBuffer(_x_, _y_, _z_)
|
||||
|
||||
#endif // defined DBG
|
||||
#endif // DBG
|
||||
|
||||
#endif // defined __DEBUG_H
|
||||
|
@ -87,7 +87,7 @@ extern ULONG TotalPagesInLookupTable;
|
||||
extern ULONG FreePagesInLookupTable;
|
||||
extern ULONG LastFreePageHint;
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
PCSTR MmGetSystemMemoryMapTypeString(MEMORY_TYPE Type);
|
||||
#endif
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <freeldr.h>
|
||||
#include <debug.h>
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
typedef struct
|
||||
{
|
||||
MEMORY_TYPE Type;
|
||||
@ -54,13 +54,13 @@ extern ULONG_PTR MmHeapStart;
|
||||
|
||||
BOOLEAN MmInitializeMemoryManager(VOID)
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
MEMORY_DESCRIPTOR* MemoryDescriptor = NULL;
|
||||
#endif
|
||||
|
||||
DPRINTM(DPRINT_MEMORY, "Initializing Memory Manager.\n");
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
// Dump the system memory map
|
||||
DPRINTM(DPRINT_MEMORY, "System Memory Map (Base Address, Length, Type):\n");
|
||||
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);
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
PCSTR MmGetSystemMemoryMapTypeString(MEMORY_TYPE Type)
|
||||
{
|
||||
ULONG Index;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <freeldr.h>
|
||||
#include <debug.h>
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
VOID DumpMemoryAllocMap(VOID);
|
||||
VOID MemAllocTest(VOID);
|
||||
#endif // DBG
|
||||
@ -69,7 +69,7 @@ PVOID MmAllocateMemoryWithType(ULONG MemorySize, TYPE_OF_MEMORY MemoryType)
|
||||
FreePagesInLookupTable -= PagesNeeded;
|
||||
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, "Memory allocation pointer: 0x%x\n", MemPointer);
|
||||
#endif // DBG
|
||||
@ -169,7 +169,7 @@ PVOID MmAllocateMemoryAtAddress(ULONG MemorySize, PVOID DesiredAddress, TYPE_OF_
|
||||
FreePagesInLookupTable -= PagesNeeded;
|
||||
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, "Memory allocation pointer: 0x%x\n", MemPointer);
|
||||
#endif // DBG
|
||||
@ -242,7 +242,7 @@ PVOID MmAllocateHighestMemoryBelowAddress(ULONG MemorySize, PVOID DesiredAddress
|
||||
FreePagesInLookupTable -= PagesNeeded;
|
||||
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, "Memory allocation pointer: 0x%x\n", MemPointer);
|
||||
#endif // DBG
|
||||
@ -259,7 +259,7 @@ VOID MmFreeMemory(PVOID MemoryPointer)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
VOID DumpMemoryAllocMap(VOID)
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ VOID LoadReactOSSetup(VOID)
|
||||
if (!*SourcePath)
|
||||
SourcePath = "\\";
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Get load options */
|
||||
if (InfFindFirstLine (InfHandle,
|
||||
"SetupData",
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <freeldr.h>
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
VOID FASTCALL
|
||||
CHECK_PAGED_CODE_RTL(char *file, int line)
|
||||
{
|
||||
|
@ -614,7 +614,7 @@ WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||
DPRINTM(DPRINT_WINDOWS, "Memory Descriptor List prepared, printing PDE\n");
|
||||
List_PaToVa(&LoaderBlock->MemoryDescriptorListHead);
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
{
|
||||
ULONG *PDE_Addr=(ULONG *)PDE;//0xC0300000;
|
||||
int j;
|
||||
|
@ -28,7 +28,7 @@ typedef BOOL
|
||||
ULONG ul_reason_for_call,
|
||||
LPVOID lpReserved);
|
||||
|
||||
#if defined(KDBG) || defined(DBG)
|
||||
#if defined(KDBG) || DBG
|
||||
VOID
|
||||
LdrpLoadUserModuleSymbols(PLDR_DATA_TABLE_ENTRY LdrModule);
|
||||
#endif
|
||||
|
@ -427,7 +427,7 @@ LdrpInit2(PCONTEXT Context,
|
||||
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
|
||||
&NtModule->InInitializationOrderModuleList);
|
||||
|
||||
#if defined(DBG) || defined(KDBG)
|
||||
#if DBG || defined(KDBG)
|
||||
|
||||
LdrpLoadUserModuleSymbols(NtModule);
|
||||
|
||||
@ -475,7 +475,7 @@ LdrpInit2(PCONTEXT Context,
|
||||
|
||||
LdrpInitLoader();
|
||||
|
||||
#if defined(DBG) || defined(KDBG)
|
||||
#if DBG || defined(KDBG)
|
||||
|
||||
LdrpLoadUserModuleSymbols(ExeModule);
|
||||
|
||||
|
@ -69,7 +69,7 @@ static VOID LdrpDetachProcess(BOOLEAN UnloadAll);
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
#if defined(DBG) || defined(KDBG)
|
||||
#if DBG || defined(KDBG)
|
||||
|
||||
VOID
|
||||
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);
|
||||
return Status;
|
||||
}
|
||||
#if defined(DBG) || defined(KDBG)
|
||||
#if DBG || defined(KDBG)
|
||||
LdrpLoadUserModuleSymbols(*Module);
|
||||
#endif /* DBG || KDBG */
|
||||
RtlEnterCriticalSection(NtCurrentPeb()->LoaderLock);
|
||||
|
@ -162,7 +162,7 @@ RtlpFreeMemory(PVOID Mem,
|
||||
}
|
||||
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
VOID FASTCALL
|
||||
CHECK_PAGED_CODE_RTL(char *file, int line)
|
||||
{
|
||||
|
@ -26,7 +26,7 @@
|
||||
#define EXPORT CALLBACK
|
||||
#endif
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* See debug.h for debug/trace constants */
|
||||
DWORD DebugTraceLevel = MAX_TRACE;
|
||||
#endif /* DBG */
|
||||
|
@ -22,7 +22,7 @@
|
||||
#undef ASSERT
|
||||
#endif
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern DWORD DebugTraceLevel;
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
//DWORD DebugTraceLevel = DEBUG_ULTRA;
|
||||
DWORD DebugTraceLevel = 0;
|
||||
#endif /* DBG */
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
ULONG DbgPrint(PCH Format,...);
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern DWORD DebugTraceLevel;
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
/* See debug.h for debug/trace constants */
|
||||
DWORD DebugTraceLevel = MAX_TRACE;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#undef ASSERT
|
||||
#endif
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern DWORD DebugTraceLevel;
|
||||
|
||||
|
@ -32,7 +32,7 @@ DereferenceProviderByPointer(PCATALOG_ENTRY Provider)
|
||||
{
|
||||
WS_DbgPrint(MAX_TRACE, ("Provider (0x%X).\n", Provider));
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (Provider->ReferenceCount <= 0)
|
||||
{
|
||||
WS_DbgPrint(MIN_TRACE, ("Provider at 0x%X has invalid reference count (%ld).\n",
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <handle.h>
|
||||
#include <upcall.h>
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
/* See debug.h for debug/trace constants */
|
||||
//DWORD DebugTraceLevel = MIN_TRACE;
|
||||
@ -657,7 +657,7 @@ WSAAccept(IN SOCKET s,
|
||||
|
||||
if ( addr )
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
LPSOCKADDR_IN sa = (LPSOCKADDR_IN)addr;
|
||||
WS_DbgPrint(MAX_TRACE,("Returned address: %d %s:%d (len %d)\n",
|
||||
sa->sin_family,
|
||||
|
@ -21,7 +21,7 @@
|
||||
#undef ASSERT
|
||||
#endif
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern DWORD DebugTraceLevel;
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "ws2help.h"
|
||||
|
||||
#include <debug.h>
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
/* See debug.h for debug/trace constants */
|
||||
DWORD DebugTraceLevel = MAX_TRACE;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#define DEBUG_ULTRA 0xFFFFFFFF
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern DWORD DebugTraceLevel;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
/* See debug.h for debug/trace constants */
|
||||
DWORD DebugTraceLevel = MAX_TRACE;
|
||||
|
@ -267,7 +267,7 @@ VfatSetDispositionInformation(PFILE_OBJECT FileObject,
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PFILE_DISPOSITION_INFORMATION DispositionInfo)
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
PDEVICE_EXTENSION DeviceExt = DeviceObject->DeviceExtension;
|
||||
#endif
|
||||
|
||||
|
@ -42,7 +42,7 @@ ReadRegistryEntries(
|
||||
/* Default value for CrashOnCtrlScroll depends if we're
|
||||
* running a debug build or a normal build.
|
||||
*/
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
DefaultCrashOnCtrlScroll = 1;
|
||||
#else
|
||||
DefaultCrashOnCtrlScroll = 0;
|
||||
|
@ -264,7 +264,7 @@ UINT SocketAcquireStateLock( PAFD_FCB FCB ) {
|
||||
}
|
||||
|
||||
VOID SocketStateUnlock( PAFD_FCB FCB ) {
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
PVOID CurrentThread = KeGetCurrentThread();
|
||||
#endif
|
||||
ASSERT(FCB->LockCount > 0);
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "tdiconn.h"
|
||||
#include "debug.h"
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
/* See debug.h for debug/trace constants */
|
||||
//DWORD DebugTraceLevel = DEBUG_ULTRA;
|
||||
@ -349,7 +349,7 @@ AfdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
PFILE_OBJECT FileObject = IrpSp->FileObject;
|
||||
#endif
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "tdiconn.h"
|
||||
#include "tdi_proto.h"
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
#if 0
|
||||
static VOID DisplayBuffer(
|
||||
PVOID Buffer,
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define DEBUG_IRP 0x00000200
|
||||
#define DEBUG_ULTRA 0xFFFFFFFF
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern DWORD DebugTraceLevel;
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define DEBUG_MEMORY 0x00000100
|
||||
#define DEBUG_ULTRA 0xFFFFFFFF
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern ULONG DebugTraceLevel;
|
||||
|
||||
|
@ -479,7 +479,7 @@ NDIS_STATUS NICStop(
|
||||
NdisStallExecution(500);
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (i == 4)
|
||||
NDIS_DbgPrint(MIN_TRACE, ("NIC was not reset after 2ms.\n"));
|
||||
#endif
|
||||
@ -686,7 +686,7 @@ VOID NICReadDataAlign(
|
||||
NdisStallExecution(4);
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (Count == 0xFFFF)
|
||||
NDIS_DbgPrint(MIN_TRACE, ("Remote DMA did not complete.\n"));
|
||||
#endif
|
||||
@ -741,7 +741,7 @@ VOID NICWriteDataAlign(
|
||||
NdisStallExecution(4);
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (Count == 0xFFFF)
|
||||
NDIS_DbgPrint(MIN_TRACE, ("Remote DMA did not complete.\n"));
|
||||
#endif
|
||||
@ -778,7 +778,7 @@ VOID NICWriteDataAlign(
|
||||
NdisStallExecution(4);
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (Count == 0xFFFF)
|
||||
NDIS_DbgPrint(MIN_TRACE, ("Remote DMA did not complete.\n"));
|
||||
#endif
|
||||
@ -1184,7 +1184,7 @@ static VOID HandleReceive(
|
||||
NdisStallExecution(500);
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (i == 4)
|
||||
NDIS_DbgPrint(MIN_TRACE, ("NIC was not reset after 2ms.\n"));
|
||||
#endif
|
||||
|
@ -19,7 +19,7 @@ DriverEntry(
|
||||
PUNICODE_STRING RegistryPath);
|
||||
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
/* See debug.h for debug/trace constants */
|
||||
ULONG DebugTraceLevel = 0;
|
||||
|
@ -33,7 +33,7 @@
|
||||
#define DEBUG_CPOINT 0x00800000
|
||||
#define DEBUG_ULTRA 0xFFFFFFFF
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern DWORD DebugTraceLevel;
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define DEBUG_PACKET 0x00000800
|
||||
#define DEBUG_ULTRA 0xFFFFFFFF
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern ULONG DebugTraceLevel;
|
||||
|
||||
|
@ -108,7 +108,7 @@ extern LIST_ENTRY AdapterListHead;
|
||||
extern KSPIN_LOCK AdapterListLock;
|
||||
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
VOID
|
||||
MiniDisplayPacket(
|
||||
PNDIS_PACKET Packet);
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "ndissys.h"
|
||||
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
/* See debug.h for debug/trace constants */
|
||||
ULONG DebugTraceLevel = MIN_TRACE;
|
||||
|
@ -62,7 +62,7 @@ VOID
|
||||
MiniDisplayPacket(
|
||||
PNDIS_PACKET Packet)
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
ULONG i, Length;
|
||||
UCHAR Buffer[64];
|
||||
if ((DebugTraceLevel & DEBUG_PACKET) > 0) {
|
||||
@ -92,7 +92,7 @@ MiniDisplayPacket2(
|
||||
PVOID LookaheadBuffer,
|
||||
UINT LookaheadBufferSize)
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if ((DebugTraceLevel & DEBUG_PACKET) > 0) {
|
||||
ULONG i, Length;
|
||||
PUCHAR p;
|
||||
@ -520,7 +520,7 @@ MiniAdapterHasAddress(
|
||||
|
||||
NDIS_DbgPrint(DEBUG_MINIPORT, ("Called.\n"));
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if(!Adapter)
|
||||
{
|
||||
NDIS_DbgPrint(MID_TRACE, ("Adapter object was null\n"));
|
||||
@ -1586,7 +1586,7 @@ DoQueries(
|
||||
return NdisStatus;
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
{
|
||||
/* 802.3 only */
|
||||
|
||||
|
@ -247,7 +247,7 @@ ProIndicatePacket(
|
||||
|
||||
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
MiniDisplayPacket(Packet);
|
||||
#endif
|
||||
|
||||
|
@ -649,7 +649,7 @@ VOID LANTransmit(
|
||||
EHeader->EType = ETYPE_IPv6;
|
||||
break;
|
||||
default:
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Should not happen */
|
||||
TI_DbgPrint(MIN_TRACE, ("Unknown LAN protocol.\n"));
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
(IPAddress)->Address.IPv4Address = (RawAddress); \
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
PCHAR A2S(
|
||||
PIP_ADDRESS Address);
|
||||
|
@ -33,7 +33,7 @@
|
||||
#define DEBUG_INFO 0x02000000
|
||||
#define DEBUG_ULTRA 0x7FFFFFFF
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
#define REMOVE_PARENS(...) __VA_ARGS__
|
||||
#define TI_DbgPrint(_t_, _x_) \
|
||||
|
@ -15,7 +15,7 @@
|
||||
#define AllocatePacketWithBuffer(x,y,z) AllocatePacketWithBufferX(x,y,z,__FILE__,__LINE__)
|
||||
#define FreeNdisPacket(x) FreeNdisPacketX(x,__FILE__,__LINE__)
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
#define MTMARK() TrackDumpFL(__FILE__, __LINE__)
|
||||
#define exAllocatePool(x,y) ExAllocatePoolX(x,y,__FILE__,__LINE__)
|
||||
#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolX(x,y,__FILE__,__LINE__)
|
||||
|
@ -58,7 +58,7 @@ void GetDataPtr( PNDIS_PACKET Packet,
|
||||
PCHAR *DataOut,
|
||||
PUINT Size );
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
VOID DisplayIPPacket(
|
||||
PIP_PACKET IPPacket);
|
||||
#define DISPLAY_IP_PACKET(x) DisplayIPPacket(x)
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define __TITYPES_H
|
||||
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
#define DEFINE_TAG ULONG Tag;
|
||||
#define INIT_TAG(_Object, _Tag) \
|
||||
|
@ -164,7 +164,7 @@ VOID NTAPI DispCancelRequest(
|
||||
Irp->IoStatus.Status = STATUS_CANCELLED;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (!Irp->Cancel)
|
||||
TI_DbgPrint(MIN_TRACE, ("Irp->Cancel is FALSE, should be TRUE.\n"));
|
||||
#endif
|
||||
@ -243,7 +243,7 @@ VOID NTAPI DispCancelListenRequest(
|
||||
|
||||
TI_DbgPrint(DEBUG_IRP, ("IRP at (0x%X).\n", Irp));
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (!Irp->Cancel)
|
||||
TI_DbgPrint(MIN_TRACE, ("Irp->Cancel is FALSE, should be TRUE.\n"));
|
||||
#endif
|
||||
|
@ -622,7 +622,7 @@ VOID NTAPI TiUnload(
|
||||
* DriverObject = Pointer to driver object created by the system
|
||||
*/
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
KIRQL OldIrql;
|
||||
|
||||
TcpipAcquireSpinLock(&AddressFileListLock, &OldIrql);
|
||||
|
@ -126,7 +126,7 @@ typedef struct _CDROM_DATA {
|
||||
|
||||
UCHAR MediaChangeCountDown;
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
//
|
||||
// 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
|
||||
@ -176,7 +176,7 @@ typedef struct _CDROM_DATA {
|
||||
#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
|
||||
@ -984,7 +984,7 @@ Return Value:
|
||||
|
||||
deviceExtension->MediaChangeNoMedia = TRUE;
|
||||
cddata->MediaChangeIrp = NULL;
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
cddata->MediaChangeIrpTimeInUse = 0;
|
||||
cddata->MediaChangeIrpLost = FALSE;
|
||||
#endif
|
||||
@ -5746,7 +5746,7 @@ Return Value:
|
||||
|
||||
cddata->MediaChangeCountDown--;
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
cddata->MediaChangeIrpTimeInUse = 0;
|
||||
cddata->MediaChangeIrpLost = FALSE;
|
||||
#endif
|
||||
@ -5833,7 +5833,7 @@ Return Value:
|
||||
}
|
||||
} else {
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if(cddata->MediaChangeIrpLost == FALSE) {
|
||||
if(cddata->MediaChangeIrpTimeInUse++ >
|
||||
MEDIA_CHANGE_TIMEOUT_TIME) {
|
||||
|
@ -3077,7 +3077,7 @@ AtapiCallBack__(
|
||||
goto ReturnCallback;
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (!IS_RDP((srb->Cdb[0]))) {
|
||||
KdPrint2((PRINT_PREFIX "AtapiCallBack: Invalid CDB marked as RDP - %#x\n", srb->Cdb[0]));
|
||||
}
|
||||
|
@ -6060,7 +6060,7 @@ ehci_isr(PKINTERRUPT interrupt, PVOID context)
|
||||
|
||||
PEHCI_DEV ehci;
|
||||
ULONG status;
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
ULONG urb_count;
|
||||
#endif
|
||||
PLIST_ENTRY pthis, pnext;
|
||||
@ -6116,7 +6116,7 @@ ehci_isr(PKINTERRUPT interrupt, PVOID context)
|
||||
door_bell_rings = ((status & STS_IAA) != 0);
|
||||
|
||||
// scan to remove those due
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
urb_count = dbg_count_list(&ehci->urb_list);
|
||||
ehci_dbg_print(DBGLVL_MAXIMUM, ("ehci_isr(): urb# in process is %d\n", urb_count));
|
||||
#endif
|
||||
|
@ -41,7 +41,7 @@ extern "C" {
|
||||
#undef DebugPrint
|
||||
#endif
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
#define DebugPrint(x) ChangerClassDebugPrint x
|
||||
#else
|
||||
#define DebugPrint(x)
|
||||
|
@ -33,7 +33,7 @@ extern "C" {
|
||||
#define SCSIPORTAPI DECLSPEC_IMPORT
|
||||
#endif
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
#define DebugPrint(x) ScsiDebugPrint x
|
||||
#else
|
||||
#define DebugPrint(x)
|
||||
@ -56,7 +56,7 @@ typedef PHYSICAL_ADDRESS SCSI_PHYSICAL_ADDRESS, *PSCSI_PHYSICAL_ADDRESS;
|
||||
|
||||
#define MAXIMUM_CDB_SIZE 12
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
#define SCSI_PORT_SIGNATURE 0x54524f50
|
||||
#endif
|
||||
|
||||
|
@ -404,7 +404,7 @@ StorPortSynchronizeAccess(
|
||||
IN PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine,
|
||||
IN PVOID Context);
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
#define DebugPrint(x) StorPortDebugPrint x
|
||||
#else
|
||||
#define DebugPrint(x)
|
||||
|
@ -86,7 +86,7 @@ typedef HW_DMA_RETURN
|
||||
#undef PAGED_CODE
|
||||
#endif
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
#define PAGED_CODE() \
|
||||
if (VideoPortGetCurrentIrql() > 1 /* APC_LEVEL */) \
|
||||
@ -1540,7 +1540,7 @@ VideoPortZeroMemory(
|
||||
IN PVOID Destination,
|
||||
IN ULONG Length);
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
#define VideoDebugPrint(x) VideoPortDebugPrint x
|
||||
#else
|
||||
#define VideoDebugPrint(x)
|
||||
|
@ -4256,7 +4256,7 @@ typedef struct _IO_REMOVE_LOCK_DBG_BLOCK {
|
||||
|
||||
typedef struct _IO_REMOVE_LOCK {
|
||||
IO_REMOVE_LOCK_COMMON_BLOCK Common;
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
IO_REMOVE_LOCK_DBG_BLOCK Dbg;
|
||||
#endif
|
||||
} IO_REMOVE_LOCK, *PIO_REMOVE_LOCK;
|
||||
@ -5753,7 +5753,7 @@ KeAcquireSpinLockRaiseToDpc(
|
||||
#define ROUND_TO_PAGES(Size) \
|
||||
((ULONG_PTR) (((ULONG_PTR) Size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)))
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
#define ASSERT(exp) \
|
||||
(VOID)((!(exp)) ? \
|
||||
@ -6273,7 +6273,7 @@ ExUuidCreate(
|
||||
#define ExReleaseResourceForThread ExReleaseResourceForThreadLite
|
||||
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
#define PAGED_CODE() { \
|
||||
if (KeGetCurrentIrql() > APC_LEVEL) { \
|
||||
@ -10267,7 +10267,7 @@ DbgSetDebugFilterState(
|
||||
IN ULONG Level,
|
||||
IN BOOLEAN State);
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
#define KdPrint(_x_) DbgPrint _x_
|
||||
#define KdPrintEx(_x_) DbgPrintEx _x_
|
||||
|
@ -78,7 +78,7 @@ RtlAssert(
|
||||
|
||||
/* Print stuff only on Debug Builds*/
|
||||
#define DPFLTR_DEFAULT_ID -1
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
/* These are always printed */
|
||||
#define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint
|
||||
|
@ -179,7 +179,7 @@ PIP_INTERFACE IPCreateInterface(
|
||||
|
||||
TI_DbgPrint(DEBUG_IP, ("Called. BindInfo (0x%X).\n", BindInfo));
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
if (BindInfo->Address) {
|
||||
PUCHAR A = BindInfo->Address;
|
||||
TI_DbgPrint(DEBUG_IP, ("Interface address (%02X %02X %02X %02X %02X %02X).\n",
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "precomp.h"
|
||||
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
#define TRACK_TAG TAG('T','r','C','K')
|
||||
|
||||
static LIST_ENTRY AllocatedObjectsList;
|
||||
|
@ -26,7 +26,7 @@ UINT Random(
|
||||
return RandomNumber;
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
static VOID DisplayIPHeader(
|
||||
PCHAR Header,
|
||||
UINT Length)
|
||||
@ -131,7 +131,7 @@ VOID DisplayTCPPacket(
|
||||
VOID DisplayIPPacket(
|
||||
PIP_PACKET IPPacket)
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
PCHAR p;
|
||||
UINT Length;
|
||||
PNDIS_BUFFER Buffer;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define FBSD_MALLOC FOURCC('d','s','b','f')
|
||||
#define EXALLOC_TAG FOURCC('E','x','A','l')
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
#define MTMARK() TrackDumpFL(__FILE__, __LINE__)
|
||||
#define NdisAllocateBuffer(x,y,z,a,b) { \
|
||||
NdisAllocateBuffer(x,y,z,a,b); \
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include <oskittypes.h>
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern OSK_UINT OskitDebugTraceLevel;
|
||||
|
||||
|
@ -125,7 +125,7 @@ BOOLEAN NTAPI
|
||||
RtlFreeHandle(PRTL_HANDLE_TABLE HandleTable,
|
||||
PRTL_HANDLE_TABLE_ENTRY Handle)
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* check if handle is valid */
|
||||
if (!RtlIsValidHandle(HandleTable, Handle))
|
||||
{
|
||||
|
@ -9,7 +9,7 @@
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
/* PAGED_CODE equivalent for user-mode RTL */
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
extern VOID FASTCALL CHECK_PAGED_CODE_RTL(char *file, int line);
|
||||
#define PAGED_CODE_RTL() CHECK_PAGED_CODE_RTL(__FILE__, __LINE__)
|
||||
#else
|
||||
|
@ -79,7 +79,7 @@ void* _alloca(size_t size);
|
||||
#error Unknown compiler for alloca intrinsic stack allocation "function"
|
||||
#endif
|
||||
|
||||
#if defined(DBG) || defined(KDBG)
|
||||
#if DBG || defined(KDBG)
|
||||
static void CcRosCacheSegmentIncRefCount_ ( PCACHE_SEGMENT cs, const char* file, int line )
|
||||
{
|
||||
++cs->ReferenceCount;
|
||||
@ -117,7 +117,7 @@ CcRosTraceCacheMap (
|
||||
PBCB Bcb,
|
||||
BOOLEAN Trace )
|
||||
{
|
||||
#if defined(DBG) || defined(KDBG)
|
||||
#if DBG || defined(KDBG)
|
||||
KIRQL oldirql;
|
||||
PLIST_ENTRY current_entry;
|
||||
PCACHE_SEGMENT current;
|
||||
@ -596,7 +596,7 @@ CcRosCreateCacheSegment(PBCB Bcb,
|
||||
current->PageOut = FALSE;
|
||||
current->FileOffset = ROUND_DOWN(FileOffset, Bcb->CacheSegmentSize);
|
||||
current->Bcb = Bcb;
|
||||
#if defined(DBG) || defined(KDBG)
|
||||
#if DBG || defined(KDBG)
|
||||
if ( Bcb->Trace )
|
||||
{
|
||||
DPRINT1("CacheMap 0x%p: new Cache Segment: 0x%p\n", Bcb, current );
|
||||
@ -628,7 +628,7 @@ CcRosCreateCacheSegment(PBCB Bcb,
|
||||
{
|
||||
CcRosCacheSegmentIncRefCount(current);
|
||||
KeReleaseSpinLock(&Bcb->BcbLock, oldIrql);
|
||||
#if defined(DBG) || defined(KDBG)
|
||||
#if DBG || defined(KDBG)
|
||||
if ( Bcb->Trace )
|
||||
{
|
||||
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;
|
||||
#endif
|
||||
DPRINT("Freeing cache segment 0x%p\n", CacheSeg);
|
||||
#if defined(DBG) || defined(KDBG)
|
||||
#if DBG || defined(KDBG)
|
||||
if ( CacheSeg->Bcb->Trace )
|
||||
{
|
||||
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, ¤t->BcbSegmentListEntry);
|
||||
}
|
||||
#if defined(DBG) || defined(KDBG)
|
||||
#if DBG || defined(KDBG)
|
||||
Bcb->Trace = FALSE;
|
||||
#endif
|
||||
KeReleaseSpinLock(&Bcb->BcbLock, oldIrql);
|
||||
|
@ -461,7 +461,7 @@ _ExInterlockedDecrementLong@8:
|
||||
|
||||
/*ULONG
|
||||
*NTAPI
|
||||
*ExInterlockedExchangeUlong(IN PULONG Taget,
|
||||
*ExInterlockedExchangeUlong(IN PULONG Target,
|
||||
* IN ULONG Value,
|
||||
* IN PKSPIN_LOCK Lock)
|
||||
*/
|
||||
@ -529,7 +529,7 @@ _Exi386InterlockedDecrementLong@4:
|
||||
|
||||
/*ULONG
|
||||
*NTAPI
|
||||
*Exi386InterlockedExchangeUlong(IN PULONG Taget,
|
||||
*Exi386InterlockedExchangeUlong(IN PULONG Target,
|
||||
* IN ULONG Value,
|
||||
* IN PKSPIN_LOCK Lock)
|
||||
*/
|
||||
|
@ -182,7 +182,7 @@ ExfWakePushLock(PEX_PUSH_LOCK PushLock,
|
||||
/* Sanity check */
|
||||
ASSERT(!WaitBlock->Signaled);
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* We are about to get signaled */
|
||||
WaitBlock->Signaled = TRUE;
|
||||
#endif
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define IsOwnedExclusive(r) (r->Flag & ResourceOwnedExclusive)
|
||||
#define IsBoostAllowed(r) (!(r->Flag & ResourceHasDisabledPriorityBoost))
|
||||
|
||||
#if (!(defined(CONFIG_SMP)) && !(defined(DBG)))
|
||||
#if (!(defined(CONFIG_SMP)) && !(DBG))
|
||||
|
||||
FORCEINLINE
|
||||
VOID
|
||||
|
@ -16,7 +16,7 @@
|
||||
/********** mm/ppool.c **********/
|
||||
|
||||
/* Disable Debugging Features */
|
||||
#ifndef DBG
|
||||
#if !DBG
|
||||
/* Enable strict checking of the nonpaged pool on every allocation */
|
||||
#undef ENABLE_VALIDATE_POOL
|
||||
|
||||
|
@ -116,7 +116,7 @@ typedef struct _BCB
|
||||
PVOID LazyWriteContext;
|
||||
KSPIN_LOCK BcbLock;
|
||||
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 */
|
||||
#endif
|
||||
} BCB, *PBCB;
|
||||
|
@ -997,7 +997,7 @@ PendingUserApc:
|
||||
// @remark
|
||||
//
|
||||
.macro TRAP_EPILOG SystemCall, RestorePreviousMode, RestoreSegments, RestoreVolatiles, RestoreAllRegs
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Assert the flags */
|
||||
pushfd
|
||||
pop edx
|
||||
@ -1011,7 +1011,7 @@ PendingUserApc:
|
||||
/* Assert the trap frame */
|
||||
#endif
|
||||
5:
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
sub dword ptr [esp+KTRAP_FRAME_DEBUGARGMARK], 0xBADB0D00
|
||||
jnz 0f
|
||||
|
||||
@ -1033,7 +1033,7 @@ PendingUserApc:
|
||||
/* Get exception list */
|
||||
mov edx, [esp+KTRAP_FRAME_EXCEPTION_LIST]
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Assert the saved exception list */
|
||||
or edx, edx
|
||||
jnz 1f
|
||||
@ -1048,7 +1048,7 @@ PendingUserApc:
|
||||
/* Get previous mode */
|
||||
mov ecx, [esp+KTRAP_FRAME_PREVIOUS_MODE]
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Assert the saved previous mode */
|
||||
cmp ecx, -1
|
||||
jnz 1f
|
||||
@ -1061,7 +1061,7 @@ PendingUserApc:
|
||||
mov byte ptr [esi+KTHREAD_PREVIOUS_MODE], cl
|
||||
.else
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Assert the saved previous mode */
|
||||
mov ecx, [esp+KTRAP_FRAME_PREVIOUS_MODE]
|
||||
cmp ecx, -1
|
||||
@ -1304,7 +1304,7 @@ FastExit:
|
||||
.endif
|
||||
.endm
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
.macro VERIFY_INT Label
|
||||
/* Get the current time and mask it to 192 ticks */
|
||||
|
@ -66,7 +66,7 @@ KdPortPutByteEx(
|
||||
/* SYMBOL ROUTINES **********************************************************/
|
||||
#ifdef __NTOSKRNL__
|
||||
|
||||
#if defined(KDBG) || defined(DBG)
|
||||
#if defined(KDBG) || DBG
|
||||
|
||||
VOID
|
||||
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)
|
||||
#endif
|
||||
|
||||
#if defined(KDBG) || defined(DBG)
|
||||
#if defined(KDBG) || DBG
|
||||
# define KeRosPrintAddress(ADDRESS) KdbSymPrintAddress(ADDRESS)
|
||||
#else
|
||||
# define KeRosPrintAddress(ADDRESS) KiRosPrintAddress(ADDRESS)
|
||||
|
@ -445,7 +445,7 @@ KxAcquireSpinLock(IN PKSPIN_LOCK SpinLock)
|
||||
/* Value changed... wait until it's locked */
|
||||
while (*(volatile KSPIN_LOCK *)SpinLock == 1)
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* On debug builds, we use a much slower but useful routine */
|
||||
//Kii386SpinOnSpinLock(SpinLock, 5);
|
||||
|
||||
@ -459,7 +459,7 @@ KxAcquireSpinLock(IN PKSPIN_LOCK SpinLock)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* On debug builds, we OR in the KTHREAD */
|
||||
*SpinLock = (KSPIN_LOCK)KeGetCurrentThread() | 1;
|
||||
#endif
|
||||
@ -476,7 +476,7 @@ FORCEINLINE
|
||||
VOID
|
||||
KxReleaseSpinLock(IN PKSPIN_LOCK SpinLock)
|
||||
{
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Make sure that the threads match */
|
||||
if (((KSPIN_LOCK)KeGetCurrentThread() | 1) != *SpinLock)
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ KdpServiceDispatcher(ULONG Service,
|
||||
Result = KdpPrintString(Buffer1, Buffer1Length);
|
||||
break;
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
case TAG('R', 'o', 's', ' '): /* ROS-INTERNAL */
|
||||
{
|
||||
switch ((ULONG)Buffer1)
|
||||
|
@ -694,7 +694,7 @@ KdbInitialize(PKD_DISPATCH_TABLE DispatchTable,
|
||||
|
||||
LoadSymbols = FALSE;
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Load symbols only if we have 96Mb of RAM or more */
|
||||
if (MmNumberOfPhysicalPages >= 0x6000)
|
||||
LoadSymbols = TRUE;
|
||||
|
@ -65,7 +65,7 @@ KiInitializeKernel(IN PKPROCESS InitProcess,
|
||||
#ifndef CONFIG_SMP
|
||||
Prcb->BuildType |= PRCB_BUILD_UNIPROCESSOR;
|
||||
#endif
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
Prcb->BuildType |= PRCB_BUILD_DEBUG;
|
||||
#endif
|
||||
Prcb->CurrentThread = InitThread;
|
||||
|
@ -140,7 +140,7 @@ _KiFlushNPXState@4:
|
||||
cmp dword ptr [esp+20], 0
|
||||
je Return
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Assert Fxsr support */
|
||||
test byte ptr _KeI386FxsrPresent, 1
|
||||
jnz AssertOk
|
||||
@ -167,7 +167,7 @@ Cr0OK:
|
||||
cmp byte ptr [eax+KTHREAD_NPX_STATE], NPX_STATE_NOT_LOADED
|
||||
jnz DontSave
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* We are the NPX Thread with an unloaded NPX State... this isn't normal! */
|
||||
int 3
|
||||
#endif
|
||||
@ -365,7 +365,7 @@ NotBusy:
|
||||
|
||||
AfterTrace:
|
||||
#ifdef CONFIG_SMP
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Assert that we're on the right CPU */
|
||||
mov cl, [esi+KTHREAD_NEXT_PROCESSOR]
|
||||
cmp cl, [ebx+KPCR_PROCESSOR_NUMBER]
|
||||
@ -419,7 +419,7 @@ StackOk:
|
||||
lock xor [eax+KPROCESS_ACTIVE_PROCESSORS], ecx
|
||||
|
||||
/* Assert change went ok */
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
test [ebp+KPROCESS_ACTIVE_PROCESSORS], ecx
|
||||
jz WrongActiveCpu
|
||||
test [eax+KPROCESS_ACTIVE_PROCESSORS], ecx
|
||||
@ -548,7 +548,7 @@ LoadLdt:
|
||||
|
||||
NewCr0:
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Assert NPX State */
|
||||
test byte ptr [esi+KTHREAD_NPX_STATE], ~(NPX_STATE_NOT_LOADED)
|
||||
jnz InvalidNpx
|
||||
@ -589,7 +589,7 @@ BugCheckDpc:
|
||||
push ATTEMPTED_SWITCH_FROM_DPC
|
||||
call _KeBugCheckEx@20
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
InvalidNpx:
|
||||
int 3
|
||||
WrongActiveCpu:
|
||||
@ -836,7 +836,7 @@ _KiSwapProcess@8:
|
||||
lock xor [eax+KPROCESS_ACTIVE_PROCESSORS], ecx
|
||||
|
||||
/* Sanity check */
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
test dword ptr [edx+KPROCESS_ACTIVE_PROCESSORS], 0
|
||||
jz WrongCpu1
|
||||
test dword ptr [eax+KPROCESS_ACTIVE_PROCESSORS], 0
|
||||
@ -871,7 +871,7 @@ NewLdt:
|
||||
/* FIXME: TODO */
|
||||
int 3
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
WrongCpu1:
|
||||
int 3
|
||||
WrongCpu2:
|
||||
|
@ -351,7 +351,7 @@ KiInitializePcr(IN ULONG ProcessorNumber,
|
||||
#ifndef CONFIG_SMP
|
||||
Pcr->PrcbData.BuildType |= PRCB_BUILD_UNIPROCESSOR;
|
||||
#endif
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
Pcr->PrcbData.BuildType |= PRCB_BUILD_DEBUG;
|
||||
#endif
|
||||
|
||||
|
@ -98,7 +98,7 @@ _KeUpdateRunTime@8:
|
||||
|
||||
/* At dispatch, increase DPC time */
|
||||
inc dword ptr [eax+KPCR_PRCB_DPC_TIME]
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Update the DPC time */
|
||||
inc dword ptr [eax+KPCR_PRCB_DEBUG_DPC_TIME]
|
||||
|
||||
|
@ -200,7 +200,7 @@ NotWin32K:
|
||||
/* Increase total syscall count */
|
||||
inc dword ptr PCR[KPCR_SYSTEM_CALLS]
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Increase per-syscall count */
|
||||
mov ecx, [edi+SERVICE_DESCRIPTOR_COUNT]
|
||||
jecxz NoCountTable
|
||||
@ -239,7 +239,7 @@ CopyParams:
|
||||
call ebx
|
||||
|
||||
AfterSysCall:
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* Make sure the user-mode call didn't return at elevated IRQL */
|
||||
test byte ptr [ebp+KTRAP_FRAME_CS], MODE_MASK
|
||||
jz SkipCheck
|
||||
@ -377,7 +377,7 @@ BadStack:
|
||||
push 0
|
||||
jmp _KiTrap6
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
InvalidIrql:
|
||||
/* Save current IRQL */
|
||||
push PCR[KPCR_IRQL]
|
||||
|
@ -189,7 +189,7 @@ KeTryToAcquireSpinLockAtDpcLevel(IN OUT PKSPIN_LOCK SpinLock)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
/* On debug builds, we OR in the KTHREAD */
|
||||
*SpinLock = (ULONG_PTR)KeGetCurrentThread() | 1;
|
||||
#endif
|
||||
|
@ -24,7 +24,7 @@ typedef struct _MM_RMAP_ENTRY
|
||||
struct _MM_RMAP_ENTRY* Next;
|
||||
PEPROCESS Process;
|
||||
PVOID Address;
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
PVOID Caller;
|
||||
#endif
|
||||
}
|
||||
@ -396,7 +396,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
|
||||
}
|
||||
new_entry->Address = Address;
|
||||
new_entry->Process = (PEPROCESS)Process;
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
#ifdef __GNUC__
|
||||
new_entry->Caller = __builtin_return_address(0);
|
||||
#else
|
||||
@ -416,7 +416,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
|
||||
ExAcquireFastMutex(&RmapListLock);
|
||||
current_entry = MmGetRmapListHeadPage(Page);
|
||||
new_entry->Next = current_entry;
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
while (current_entry)
|
||||
{
|
||||
if (current_entry->Address == new_entry->Address && current_entry->Process == new_entry->Process)
|
||||
|
@ -249,7 +249,7 @@ RPoolRemoveFree ( PR_POOL pool, PR_FREE Item )
|
||||
ASSERT ( pool->FirstFree == Item );
|
||||
pool->FirstFree = Item->NextFree;
|
||||
}
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
Item->NextFree = Item->PrevFree = (PR_FREE)(ULONG_PTR)0xDEADBEEF;
|
||||
#endif//DBG
|
||||
}
|
||||
@ -290,7 +290,7 @@ RFreeInit ( void* memory )
|
||||
#endif//R_FREEMAGIC
|
||||
block->Status = 0;
|
||||
RFreeFillStack ( block );
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
block->PrevFree = block->NextFree = (PR_FREE)(ULONG_PTR)0xDEADBEEF;
|
||||
#endif//DBG
|
||||
return block;
|
||||
@ -655,7 +655,7 @@ RiUsedInit ( PR_USED Block, rulong Tag )
|
||||
//ASSERT_SIZE ( Block->Size );
|
||||
|
||||
// now add the block to the used block list
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
Block->NextUsed = (PR_USED)(ULONG_PTR)0xDEADBEEF;
|
||||
#endif//R_USED_LIST
|
||||
|
||||
@ -673,7 +673,7 @@ RiUsedInitRedZone ( PR_USED Block, rulong UserSize )
|
||||
Block->UserSize = UserSize;
|
||||
memset ( Addr - R_RZ, R_RZ_LOVALUE, R_RZ );
|
||||
memset ( Addr + Block->UserSize, R_RZ_HIVALUE, R_RZ );
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
memset ( Addr, 0xCD, UserSize );
|
||||
#endif//DBG
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
/* PRIVATE FUNCTIONS *********************************************************/
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
VOID
|
||||
NTAPI
|
||||
PspDumpThreads(BOOLEAN IncludeSystem)
|
||||
|
@ -159,7 +159,7 @@ RtlLeaveHeapLock(
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
VOID FASTCALL
|
||||
CHECK_PAGED_CODE_RTL(char *file, int line)
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ static bool _ReadFileData(FILEHANDLE handle, void* buffer, ULONG size, PULONG by
|
||||
#ifndef CAB_READ_ONLY
|
||||
|
||||
#if 0
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
void DumpBuffer(void* Buffer, ULONG Size)
|
||||
{
|
||||
|
@ -48,8 +48,6 @@
|
||||
|
||||
/* Debugging */
|
||||
|
||||
#define DBG
|
||||
|
||||
#define NORMAL_MASK 0x000000FF
|
||||
#define SPECIAL_MASK 0xFFFFFF00
|
||||
#define MIN_TRACE 0x00000001
|
||||
@ -58,7 +56,7 @@
|
||||
|
||||
#define DEBUG_MEMORY 0x00000100
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
extern ULONG DebugTraceLevel;
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "cabman.h"
|
||||
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
|
||||
ULONG DebugTraceLevel = MIN_TRACE;
|
||||
//ULONG DebugTraceLevel = MID_TRACE;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef DBG
|
||||
#if DBG
|
||||
#define trace printf
|
||||
#else
|
||||
#define trace if (0) printf
|
||||
|
Loading…
Reference in New Issue
Block a user