Use correct format for arguments in debug messages

svn path=/trunk/; revision=19984
This commit is contained in:
Hervé Poussineau 2005-12-08 23:44:31 +00:00
parent e3d8dc3fbd
commit f2e1575922
14 changed files with 66 additions and 66 deletions

View file

@ -63,14 +63,14 @@ RtlpCreateCriticalSectionSem(PRTL_CRITICAL_SECTION CriticalSection)
RtlRaiseStatus(Status); RtlRaiseStatus(Status);
return; return;
} }
DPRINT("Created Event: %x \n", hNewEvent); DPRINT("Created Event: %p \n", hNewEvent);
if ((hEvent = InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore, if ((hEvent = InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore,
(PVOID)hNewEvent, (PVOID)hNewEvent,
0))) { 0))) {
/* Some just created an event */ /* Some just created an event */
DPRINT("Closing already created event: %x\n", hNewEvent); DPRINT("Closing already created event: %p\n", hNewEvent);
NtClose(hNewEvent); NtClose(hNewEvent);
} }
} }
@ -114,7 +114,7 @@ RtlpWaitForCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
} }
/* Increase the Debug Entry count */ /* Increase the Debug Entry count */
DPRINT("Waiting on Critical Section Event: %x %x\n", DPRINT("Waiting on Critical Section Event: %p %p\n",
CriticalSection, CriticalSection,
CriticalSection->LockSemaphore); CriticalSection->LockSemaphore);
CriticalSection->DebugInfo->EntryCount++; CriticalSection->DebugInfo->EntryCount++;
@ -135,7 +135,7 @@ RtlpWaitForCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
/* Is this the 2nd time we've timed out? */ /* Is this the 2nd time we've timed out? */
if (LastChance) { if (LastChance) {
DPRINT1("Deadlock: %x\n", CriticalSection); DPRINT1("Deadlock: %p\n", CriticalSection);
/* Yes it is, we are raising an exception */ /* Yes it is, we are raising an exception */
ExceptionRecord.ExceptionCode = STATUS_POSSIBLE_DEADLOCK; ExceptionRecord.ExceptionCode = STATUS_POSSIBLE_DEADLOCK;
@ -186,7 +186,7 @@ RtlpUnWaitCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
} }
/* Signal the Event */ /* Signal the Event */
DPRINT("Signaling Critical Section Event: %x, %x\n", DPRINT("Signaling Critical Section Event: %p, %p\n",
CriticalSection, CriticalSection,
CriticalSection->LockSemaphore); CriticalSection->LockSemaphore);
Status = NtSetEvent(CriticalSection->LockSemaphore, NULL); Status = NtSetEvent(CriticalSection->LockSemaphore, NULL);
@ -194,7 +194,7 @@ RtlpUnWaitCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
if (!NT_SUCCESS(Status)) { if (!NT_SUCCESS(Status)) {
/* We've failed */ /* We've failed */
DPRINT1("Signaling Failed for: %x, %x, %x\n", DPRINT1("Signaling Failed for: %p, %p, 0x%08lx\n",
CriticalSection, CriticalSection,
CriticalSection->LockSemaphore, CriticalSection->LockSemaphore,
Status); Status);
@ -261,7 +261,7 @@ RtlpAllocateDebugInfo(VOID)
if (!RtlpDebugInfoFreeList[i]) { if (!RtlpDebugInfoFreeList[i]) {
/* Mark entry in use */ /* Mark entry in use */
DPRINT("Using entry: %d. Buffer: %x\n", i, &RtlpStaticDebugInfo[i]); DPRINT("Using entry: %lu. Buffer: %p\n", i, &RtlpStaticDebugInfo[i]);
RtlpDebugInfoFreeList[i] = TRUE; RtlpDebugInfoFreeList[i] = TRUE;
/* Use free entry found */ /* Use free entry found */
@ -307,7 +307,7 @@ RtlpFreeDebugInfo(PRTL_CRITICAL_SECTION_DEBUG DebugInfo)
/* Mark as free */ /* Mark as free */
EntryId = (DebugInfo - RtlpStaticDebugInfo); EntryId = (DebugInfo - RtlpStaticDebugInfo);
DPRINT("Freeing from Buffer: %x. Entry: %d inside Process: %x\n", DPRINT("Freeing from Buffer: %p. Entry: %lu inside Process: %p\n",
DebugInfo, DebugInfo,
EntryId, EntryId,
NtCurrentTeb()->Cid.UniqueProcess); NtCurrentTeb()->Cid.UniqueProcess);
@ -316,7 +316,7 @@ RtlpFreeDebugInfo(PRTL_CRITICAL_SECTION_DEBUG DebugInfo)
} else { } else {
/* It's a dynamic one, so free from the heap */ /* It's a dynamic one, so free from the heap */
DPRINT("Freeing from Heap: %x inside Process: %x\n", DPRINT("Freeing from Heap: %p inside Process: %p\n",
DebugInfo, DebugInfo,
NtCurrentTeb()->Cid.UniqueProcess); NtCurrentTeb()->Cid.UniqueProcess);
RtlFreeHeap(NtCurrentPeb()->ProcessHeap, 0, DebugInfo); RtlFreeHeap(NtCurrentPeb()->ProcessHeap, 0, DebugInfo);
@ -346,7 +346,7 @@ RtlDeleteCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
{ {
NTSTATUS Status = STATUS_SUCCESS; NTSTATUS Status = STATUS_SUCCESS;
DPRINT("Deleting Critical Section: %x\n", CriticalSection); DPRINT("Deleting Critical Section: %p\n", CriticalSection);
/* Close the Event Object Handle if it exists */ /* Close the Event Object Handle if it exists */
if (CriticalSection->LockSemaphore) { if (CriticalSection->LockSemaphore) {
@ -511,7 +511,7 @@ RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection,
PRTL_CRITICAL_SECTION_DEBUG CritcalSectionDebugData; PRTL_CRITICAL_SECTION_DEBUG CritcalSectionDebugData;
/* First things first, set up the Object */ /* First things first, set up the Object */
DPRINT("Initializing Critical Section: %x\n", CriticalSection); DPRINT("Initializing Critical Section: %p\n", CriticalSection);
CriticalSection->LockCount = -1; CriticalSection->LockCount = -1;
CriticalSection->RecursionCount = 0; CriticalSection->RecursionCount = 0;
CriticalSection->OwningThread = 0; CriticalSection->OwningThread = 0;
@ -520,14 +520,14 @@ RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection,
/* Allocate the Debug Data */ /* Allocate the Debug Data */
CritcalSectionDebugData = RtlpAllocateDebugInfo(); CritcalSectionDebugData = RtlpAllocateDebugInfo();
DPRINT("Allocated Debug Data: %x inside Process: %x\n", DPRINT("Allocated Debug Data: %p inside Process: %p\n",
CritcalSectionDebugData, CritcalSectionDebugData,
NtCurrentTeb()->Cid.UniqueProcess); NtCurrentTeb()->Cid.UniqueProcess);
if (!CritcalSectionDebugData) { if (!CritcalSectionDebugData) {
/* This is bad! */ /* This is bad! */
DPRINT1("Couldn't allocate Debug Data for: %x\n", CriticalSection); DPRINT1("Couldn't allocate Debug Data for: %p\n", CriticalSection);
return STATUS_NO_MEMORY; return STATUS_NO_MEMORY;
} }
@ -545,7 +545,7 @@ RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection,
*/ */
if ((CriticalSection != &RtlCriticalSectionLock) && (RtlpCritSectInitialized)) { if ((CriticalSection != &RtlCriticalSectionLock) && (RtlpCritSectInitialized)) {
DPRINT("Securely Inserting into ProcessLocks: %x, %x, %x\n", DPRINT("Securely Inserting into ProcessLocks: %p, %p, %p\n",
&CritcalSectionDebugData->ProcessLocksList, &CritcalSectionDebugData->ProcessLocksList,
CriticalSection, CriticalSection,
&RtlCriticalSectionList); &RtlCriticalSectionList);
@ -561,7 +561,7 @@ RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection,
} else { } else {
DPRINT("Inserting into ProcessLocks: %x, %x, %x\n", DPRINT("Inserting into ProcessLocks: %p, %p, %p\n",
&CritcalSectionDebugData->ProcessLocksList, &CritcalSectionDebugData->ProcessLocksList,
CriticalSection, CriticalSection,
&RtlCriticalSectionList); &RtlCriticalSectionList);

View file

@ -38,7 +38,7 @@ RtlCreateQueryDebugBuffer(IN ULONG Size,
Buf->SectionBase = Buf; Buf->SectionBase = Buf;
Buf->SectionSize = SectionSize; Buf->SectionSize = SectionSize;
DPRINT("RtlCQDB: BA: %x BS: %d\n", Buf->SectionBase, Buf->SectionSize); DPRINT("RtlCQDB: BA: %p BS: 0x%lx\n", Buf->SectionBase, Buf->SectionSize);
return Buf; return Buf;
} }
@ -99,7 +99,7 @@ RtlpQueryRemoteProcessModules(HANDLE ProcessHandle,
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* failure */ /* failure */
DPRINT("NtQueryInformationProcess 1 &x \n", Status); DPRINT("NtQueryInformationProcess 1 0x%lx \n", Status);
return Status; return Status;
} }
@ -124,7 +124,7 @@ RtlpQueryRemoteProcessModules(HANDLE ProcessHandle,
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* failure */ /* failure */
DPRINT("NtReadVirtualMemory 1 %x \n", Status); DPRINT("NtReadVirtualMemory 1 0x%lx \n", Status);
return Status; return Status;
} }
@ -142,7 +142,7 @@ RtlpQueryRemoteProcessModules(HANDLE ProcessHandle,
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* failure */ /* failure */
DPRINT("NtReadVirtualMemory 2 %x \n", Status); DPRINT("NtReadVirtualMemory 2 0x%lx \n", Status);
return Status; return Status;
} }
@ -173,7 +173,7 @@ RtlpQueryRemoteProcessModules(HANDLE ProcessHandle,
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* failure */ /* failure */
DPRINT( "NtReadVirtualMemory 3 %x \n", Status); DPRINT( "NtReadVirtualMemory 3 0x%lx \n", Status);
return Status; return Status;
} }
@ -307,7 +307,7 @@ if (Pid == ProcessId)
} }
DPRINT("QueryProcessDebugInformation end \n"); DPRINT("QueryProcessDebugInformation end \n");
DPRINT("QueryDebugInfo : %d\n", Buf->SizeOfInfo); DPRINT("QueryDebugInfo : 0x%lx\n", Buf->SizeOfInfo);
} }
else else
{ {
@ -391,7 +391,7 @@ else
} }
DPRINT("QueryProcessDebugInformation end \n"); DPRINT("QueryProcessDebugInformation end \n");
DPRINT("QueryDebugInfo : %d\n", Buf->SizeOfInfo); DPRINT("QueryDebugInfo : 0x%lx\n", Buf->SizeOfInfo);
} }
return Status; return Status;

View file

@ -80,7 +80,7 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
CHAR c; CHAR c;
StrLength = Name->Length / sizeof(WCHAR); StrLength = Name->Length / sizeof(WCHAR);
DPRINT("StrLength: %hu\n", StrLength); DPRINT("StrLength: %lu\n", StrLength);
/* Find last dot in Name */ /* Find last dot in Name */
DotPos = 0; DotPos = 0;
@ -96,7 +96,7 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
{ {
DotPos = i; DotPos = i;
} }
DPRINT("DotPos: %hu\n", DotPos); DPRINT("DotPos: %lu\n", DotPos);
/* Copy name (6 valid characters max) */ /* Copy name (6 valid characters max) */
for (i = 0, NameLength = 0; NameLength < 6 && i < DotPos; i++) for (i = 0, NameLength = 0; NameLength < 6 && i < DotPos; i++)
@ -114,7 +114,7 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
} }
DPRINT("NameBuffer: '%.08S'\n", NameBuffer); DPRINT("NameBuffer: '%.08S'\n", NameBuffer);
DPRINT("NameLength: %hu\n", NameLength); DPRINT("NameLength: %lu\n", NameLength);
/* Copy extension (4 valid characters max) */ /* Copy extension (4 valid characters max) */
if (DotPos < StrLength) if (DotPos < StrLength)
@ -138,7 +138,7 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
ExtLength = 0; ExtLength = 0;
} }
DPRINT("ExtBuffer: '%.04S'\n", ExtBuffer); DPRINT("ExtBuffer: '%.04S'\n", ExtBuffer);
DPRINT("ExtLength: %hu\n", ExtLength); DPRINT("ExtLength: %lu\n", ExtLength);
/* Determine next index */ /* Determine next index */
IndexLength = RtlpGetIndexLength(Context->LastIndexValue); IndexLength = RtlpGetIndexLength(Context->LastIndexValue);
@ -153,7 +153,7 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
Checksum = 0; Checksum = 0;
} }
DPRINT("CopyLength: %hu\n", CopyLength); DPRINT("CopyLength: %lu\n", CopyLength);
if ((Context->NameLength == CopyLength) && if ((Context->NameLength == CopyLength) &&
(wcsncmp(Context->NameBuffer, NameBuffer, CopyLength) == 0) && (wcsncmp(Context->NameBuffer, NameBuffer, CopyLength) == 0) &&
@ -181,7 +181,7 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
IndexLength = RtlpGetIndexLength(Context->LastIndexValue); IndexLength = RtlpGetIndexLength(Context->LastIndexValue);
DPRINT("CurrentIndex: %hu, IndexLength %hu\n", Context->LastIndexValue, IndexLength); DPRINT("CurrentIndex: %lu, IndexLength %lu\n", Context->LastIndexValue, IndexLength);
if (Context->CheckSumInserted) if (Context->CheckSumInserted)
{ {

View file

@ -72,7 +72,7 @@ RtlRaiseStatus(NTSTATUS Status)
{ {
EXCEPTION_RECORD ExceptionRecord; EXCEPTION_RECORD ExceptionRecord;
CONTEXT Context; CONTEXT Context;
DPRINT1("RtlRaiseStatus(Status 0x%.08x)\n", Status); DPRINT1("RtlRaiseStatus(Status 0x%.08lx)\n", Status);
/* Capture the context */ /* Capture the context */
RtlCaptureContext(&Context); RtlCaptureContext(&Context);

View file

@ -168,12 +168,12 @@ RtlIsValidIndexHandle(IN PRTL_HANDLE_TABLE HandleTable,
{ {
PRTL_HANDLE_TABLE_ENTRY InternalHandle; PRTL_HANDLE_TABLE_ENTRY InternalHandle;
DPRINT("RtlIsValidIndexHandle(HandleTable %p Index %x Handle %p)\n", HandleTable, Index, Handle); DPRINT("RtlIsValidIndexHandle(HandleTable %p Index 0x%lx Handle %p)\n", HandleTable, Index, Handle);
if (HandleTable == NULL) if (HandleTable == NULL)
return FALSE; return FALSE;
DPRINT("Handles %p HandleSize %x\n", DPRINT("Handles %p HandleSize 0x%lx\n",
HandleTable->CommittedHandles, HandleTable->SizeOfHandleTableEntry); HandleTable->CommittedHandles, HandleTable->SizeOfHandleTableEntry);
InternalHandle = (PRTL_HANDLE_TABLE_ENTRY)((ULONG_PTR)HandleTable->CommittedHandles + InternalHandle = (PRTL_HANDLE_TABLE_ENTRY)((ULONG_PTR)HandleTable->CommittedHandles +

View file

@ -206,7 +206,7 @@ HEAP_GetPtr(HANDLE heap) /* [in] Handle to the heap */
HEAP *heapPtr = (HEAP *)heap; HEAP *heapPtr = (HEAP *)heap;
if (!heapPtr || (heapPtr->magic != HEAP_MAGIC)) if (!heapPtr || (heapPtr->magic != HEAP_MAGIC))
{ {
DPRINT("Invalid heap %08x!\n", heap ); DPRINT("Invalid heap %p!\n", heap );
return NULL; return NULL;
} }
if (TRACE_ON(heap) && !HEAP_IsRealArena( heap, 0, NULL, NOISY )) if (TRACE_ON(heap) && !HEAP_IsRealArena( heap, 0, NULL, NOISY ))
@ -821,7 +821,7 @@ static BOOLEAN HEAP_ValidateFreeArena( SUBHEAP *subheap, ARENA_FREE *pArena )
if (*((ARENA_FREE **)((char *)(pArena + 1) + if (*((ARENA_FREE **)((char *)(pArena + 1) +
(pArena->size & ARENA_SIZE_MASK)) - 1) != pArena) (pArena->size & ARENA_SIZE_MASK)) - 1) != pArena)
{ {
DPRINT("Heap %p: arena %p has wrong back ptr %p\n", DPRINT("Heap %p: arena %p has wrong back ptr %lx\n",
subheap->heap, pArena, subheap->heap, pArena,
*((PULONG)((char *)(pArena+1)+ (pArena->size & ARENA_SIZE_MASK)) - 1)); *((PULONG)((char *)(pArena+1)+ (pArena->size & ARENA_SIZE_MASK)) - 1));
return FALSE; return FALSE;
@ -994,7 +994,7 @@ static BOOLEAN HEAP_IsRealArena(
if (!heapPtr || (heapPtr->magic != HEAP_MAGIC)) if (!heapPtr || (heapPtr->magic != HEAP_MAGIC))
{ {
DPRINT("Invalid heap %08x!\n", heap ); DPRINT("Invalid heap %p!\n", heap );
return FALSE; return FALSE;
} }
@ -1138,7 +1138,7 @@ RtlDestroyHeap(HANDLE heap) /* [in] Handle of heap */
ULONG flags; ULONG flags;
HEAP **pptr; HEAP **pptr;
DPRINT("%08x\n", heap ); DPRINT("%p\n", heap );
if (!heapPtr) if (!heapPtr)
return heap; return heap;
@ -1216,7 +1216,7 @@ RtlAllocateHeap(HANDLE heap, /* [in] Handle of private heap block */
if (!(pArena = HEAP_FindFreeBlock( heapPtr, size, &subheap ))) if (!(pArena = HEAP_FindFreeBlock( heapPtr, size, &subheap )))
{ {
DPRINT("(%08x,%08lx,%08lx): returning NULL\n", DPRINT("(%p,%08lx,%08lx): returning NULL\n",
heap, flags, size ); heap, flags, size );
if (!(flags & HEAP_NO_SERIALIZE)) if (!(flags & HEAP_NO_SERIALIZE))
RtlLeaveHeapLock( &heapPtr->critSection ); RtlLeaveHeapLock( &heapPtr->critSection );
@ -1250,7 +1250,7 @@ RtlAllocateHeap(HANDLE heap, /* [in] Handle of private heap block */
if (!(flags & HEAP_NO_SERIALIZE)) if (!(flags & HEAP_NO_SERIALIZE))
RtlLeaveHeapLock( &heapPtr->critSection ); RtlLeaveHeapLock( &heapPtr->critSection );
DPRINT("(%08x,%08lx,%08lx): returning %p\n", DPRINT("(%p,%08lx,%08lx): returning %p\n",
heap, flags, size, (PVOID)(pInUse + 1) ); heap, flags, size, (PVOID)(pInUse + 1) );
return (PVOID)(pInUse + 1); return (PVOID)(pInUse + 1);
} }
@ -1280,7 +1280,7 @@ BOOLEAN NTAPI RtlFreeHeap(
return FALSE; return FALSE;
if (!ptr) /* Freeing a NULL ptr is doesn't indicate an error in Win2k */ if (!ptr) /* Freeing a NULL ptr is doesn't indicate an error in Win2k */
{ {
DPRINT("(%08x,%08lx,%p): asked to free NULL\n", DPRINT("(%p,%08lx,%p): asked to free NULL\n",
heap, flags, ptr ); heap, flags, ptr );
return TRUE; return TRUE;
} }
@ -1293,7 +1293,7 @@ BOOLEAN NTAPI RtlFreeHeap(
{ {
if (!(flags & HEAP_NO_SERIALIZE)) if (!(flags & HEAP_NO_SERIALIZE))
RtlLeaveHeapLock( &heapPtr->critSection ); RtlLeaveHeapLock( &heapPtr->critSection );
DPRINT("(%08x,%08lx,%p): returning FALSE\n", DPRINT("(%p,%08lx,%p): returning FALSE\n",
heap, flags, ptr ); heap, flags, ptr );
return FALSE; return FALSE;
} }
@ -1307,7 +1307,7 @@ BOOLEAN NTAPI RtlFreeHeap(
if (!(flags & HEAP_NO_SERIALIZE)) if (!(flags & HEAP_NO_SERIALIZE))
RtlLeaveHeapLock( &heapPtr->critSection ); RtlLeaveHeapLock( &heapPtr->critSection );
DPRINT("(%08x,%08lx,%p): returning TRUE\n", DPRINT("(%p,%08lx,%p): returning TRUE\n",
heap, flags, ptr ); heap, flags, ptr );
return TRUE; return TRUE;
} }
@ -1359,7 +1359,7 @@ PVOID NTAPI RtlReAllocateHeap(
{ {
if (!(Flags & HEAP_NO_SERIALIZE)) if (!(Flags & HEAP_NO_SERIALIZE))
RtlLeaveHeapLock( &heapPtr->critSection ); RtlLeaveHeapLock( &heapPtr->critSection );
DPRINT("(%08x,%08lx,%p,%08lx): returning NULL\n", DPRINT("(%p,%08lx,%p,%08lx): returning NULL\n",
Heap, Flags, Ptr, Size ); Heap, Flags, Ptr, Size );
if (Flags & HEAP_GENERATE_EXCEPTIONS) if (Flags & HEAP_GENERATE_EXCEPTIONS)
RtlRaiseStatus( STATUS_NO_MEMORY ); RtlRaiseStatus( STATUS_NO_MEMORY );
@ -1452,7 +1452,7 @@ PVOID NTAPI RtlReAllocateHeap(
if (!(Flags & HEAP_NO_SERIALIZE)) if (!(Flags & HEAP_NO_SERIALIZE))
RtlLeaveHeapLock( &heapPtr->critSection ); RtlLeaveHeapLock( &heapPtr->critSection );
DPRINT("(%08x,%08lx,%p,%08lx): returning %p\n", DPRINT("(%p,%08lx,%p,%08lx): returning %p\n",
Heap, Flags, Ptr, Size, (PVOID)(pArena + 1) ); Heap, Flags, Ptr, Size, (PVOID)(pArena + 1) );
return (PVOID)(pArena + 1); return (PVOID)(pArena + 1);
} }
@ -1561,7 +1561,7 @@ RtlSizeHeap(
if (!(Flags & HEAP_NO_SERIALIZE)) if (!(Flags & HEAP_NO_SERIALIZE))
RtlLeaveHeapLock( &heapPtr->critSection ); RtlLeaveHeapLock( &heapPtr->critSection );
DPRINT("(%08x,%08lx,%p): returning %08lx\n", DPRINT("(%p,%08lx,%p): returning %08lx\n",
Heap, Flags, Ptr, ret ); Heap, Flags, Ptr, ret );
return ret; return ret;
} }

View file

@ -61,7 +61,7 @@ RtlDispatchException(IN PEXCEPTION_RECORD ExceptionRecord,
/* Get the current stack limits and registration frame */ /* Get the current stack limits and registration frame */
RtlpGetStackLimits(&StackLow, &StackHigh); RtlpGetStackLimits(&StackLow, &StackHigh);
RegistrationFrame = RtlpGetExceptionList(); RegistrationFrame = RtlpGetExceptionList();
DPRINT("RegistrationFrame is 0x%X\n", RegistrationFrame); DPRINT("RegistrationFrame is 0x%p\n", RegistrationFrame);
/* Now loop every frame */ /* Now loop every frame */
while (RegistrationFrame != EXCEPTION_CHAIN_END) while (RegistrationFrame != EXCEPTION_CHAIN_END)
@ -105,7 +105,7 @@ RtlDispatchException(IN PEXCEPTION_RECORD ExceptionRecord,
Context, Context,
&DispatcherContext, &DispatcherContext,
RegistrationFrame->Handler); RegistrationFrame->Handler);
DPRINT("Handler returned: %lx\n", ReturnValue); DPRINT("Handler returned: %p\n", (PVOID)ReturnValue);
/* Check if this is a nested frame */ /* Check if this is a nested frame */
if (RegistrationFrame == NestedFrame) if (RegistrationFrame == NestedFrame)
@ -188,7 +188,7 @@ RtlUnwind(PVOID RegistrationFrame OPTIONAL,
ULONG_PTR RegistrationFrameEnd; ULONG_PTR RegistrationFrameEnd;
CONTEXT LocalContext; CONTEXT LocalContext;
PCONTEXT Context; PCONTEXT Context;
DPRINT("RtlUnwind(). RegistrationFrame 0x%X\n", RegistrationFrame); DPRINT("RtlUnwind(). RegistrationFrame 0x%p\n", RegistrationFrame);
/* Get the current stack limits */ /* Get the current stack limits */
RtlpGetStackLimits(&StackLow, &StackHigh); RtlpGetStackLimits(&StackLow, &StackHigh);
@ -242,7 +242,7 @@ RtlUnwind(PVOID RegistrationFrame OPTIONAL,
/* Now loop every frame */ /* Now loop every frame */
while (RegistrationFrame2 != EXCEPTION_CHAIN_END) while (RegistrationFrame2 != EXCEPTION_CHAIN_END)
{ {
DPRINT("RegistrationFrame is 0x%X\n", RegistrationFrame2); DPRINT("RegistrationFrame is 0x%p\n", RegistrationFrame2);
/* If this is the target */ /* If this is the target */
if (RegistrationFrame2 == RegistrationFrame) if (RegistrationFrame2 == RegistrationFrame)
@ -304,7 +304,7 @@ RtlUnwind(PVOID RegistrationFrame OPTIONAL,
Context, Context,
&DispatcherContext, &DispatcherContext,
RegistrationFrame2->Handler); RegistrationFrame2->Handler);
DPRINT("Handler returned: %lx\n", ReturnValue); DPRINT("Handler returned: %p\n", (PVOID)ReturnValue);
/* Handle the dispositions */ /* Handle the dispositions */
if (ReturnValue == ExceptionContinueSearch) if (ReturnValue == ExceptionContinueSearch)

View file

@ -26,7 +26,7 @@ RtlImageNtHeader (IN PVOID BaseAddress)
if (DosHeader && DosHeader->e_magic != IMAGE_DOS_SIGNATURE) if (DosHeader && DosHeader->e_magic != IMAGE_DOS_SIGNATURE)
{ {
DPRINT1("DosHeader->e_magic %x\n", DosHeader->e_magic); DPRINT1("DosHeader->e_magic %x\n", DosHeader->e_magic);
DPRINT1("NtHeader 0x%p\n", ((ULONG_PTR)BaseAddress + DosHeader->e_lfanew)); DPRINT1("NtHeader 0x%lx\n", ((ULONG_PTR)BaseAddress + DosHeader->e_lfanew));
} }
if (DosHeader && DosHeader->e_magic == IMAGE_DOS_SIGNATURE) if (DosHeader && DosHeader->e_magic == IMAGE_DOS_SIGNATURE)

View file

@ -28,7 +28,7 @@ RtlFindMessage(PVOID BaseAddress,
PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry; PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry;
PRTL_MESSAGE_RESOURCE_DATA MessageTable; PRTL_MESSAGE_RESOURCE_DATA MessageTable;
NTSTATUS Status; NTSTATUS Status;
ULONG EntryOffset, IdOffset = 0; ULONG EntryOffset = 0, IdOffset = 0;
PRTL_MESSAGE_RESOURCE_ENTRY MessageEntry; PRTL_MESSAGE_RESOURCE_ENTRY MessageEntry;
ULONG i; ULONG i;
@ -151,7 +151,7 @@ RtlFormatMessage(PWSTR Message,
{ {
DPRINT1("RtlFormatMessage(%S, %u, %s, %s, %s, %s, %p, %lu)\n", DPRINT1("RtlFormatMessage(%S, %u, %s, %s, %s, %s, %p, %lu)\n",
Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", Ansi ? "TRUE" : "FALSE", Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", Ansi ? "TRUE" : "FALSE",
ArgumentIsArray ? "TRUE" : "FALSE", Arguments, Buffer, BufferSize); ArgumentIsArray ? "TRUE" : "FALSE", (PSTR)Arguments, Buffer, BufferSize);
UNIMPLEMENTED; UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;

View file

@ -205,7 +205,7 @@ RtlGetCurrentDirectory_U(ULONG MaximumLength,
cd->DosPath.Buffer[Length - 2] != L':') cd->DosPath.Buffer[Length - 2] != L':')
Length--; Length--;
DPRINT ("cd->DosPath.Buffer %S Length %d\n", DPRINT ("cd->DosPath.Buffer %S Length %lu\n",
cd->DosPath.Buffer, Length); cd->DosPath.Buffer, Length);
if (MaximumLength / sizeof(WCHAR) > Length) if (MaximumLength / sizeof(WCHAR) > Length)

View file

@ -76,7 +76,7 @@ RtlpInitEnvironment(HANDLE ProcessHandle,
ULONG Size; ULONG Size;
PWCHAR Environment = 0; PWCHAR Environment = 0;
DPRINT("RtlpInitEnvironment (hProcess: %lx, Peb: %p Params: %p)\n", DPRINT("RtlpInitEnvironment (hProcess: %p, Peb: %p Params: %p)\n",
ProcessHandle, Peb, ProcessParameters); ProcessHandle, Peb, ProcessParameters);
/* Give the caller 1MB if he requested it */ /* Give the caller 1MB if he requested it */
@ -134,7 +134,7 @@ RtlpInitEnvironment(HANDLE ProcessHandle,
} }
DPRINT("EnvironmentPointer %p\n", BaseAddress); DPRINT("EnvironmentPointer %p\n", BaseAddress);
DPRINT("Ppb->MaximumLength %x\n", ProcessParameters->MaximumLength); DPRINT("Ppb->MaximumLength 0x%lx\n", ProcessParameters->MaximumLength);
/* Now allocate space for the Parameter Block */ /* Now allocate space for the Parameter Block */
BaseAddress = NULL; BaseAddress = NULL;
@ -333,7 +333,7 @@ RtlEncodePointer(IN PVOID Pointer)
if(!NT_SUCCESS(Status)) if(!NT_SUCCESS(Status))
{ {
DPRINT1("Failed to receive the process cookie! Status: 0x%x\n", Status); DPRINT1("Failed to receive the process cookie! Status: 0x%lx\n", Status);
return Pointer; return Pointer;
} }

View file

@ -893,7 +893,7 @@ RtlWriteRegistryValue(IN ULONG RelativeTo,
&KeyHandle); &KeyHandle);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT("RtlpGetRegistryHandle() failed! Status: 0x%x\n", Status); DPRINT("RtlpGetRegistryHandle() failed! Status: 0x%lx\n", Status);
return(Status); return(Status);
} }
@ -908,7 +908,7 @@ RtlWriteRegistryValue(IN ULONG RelativeTo,
ValueLength); ValueLength);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT1("ZwSetValueKey() failed! Status: 0x%x\n", Status); DPRINT1("ZwSetValueKey() failed! Status: 0x%lx\n", Status);
} }
ZwClose(KeyHandle); ZwClose(KeyHandle);

View file

@ -104,7 +104,7 @@ RtlpCreateUserStack(HANDLE hProcess,
UseGuard = TRUE; UseGuard = TRUE;
} }
DPRINT("AllocatedBase: %p, StackBase: %p, Stack: %p, StackCommit: %lx\n", DPRINT("AllocatedBase: %p, StackBase: %p, Stack: %lx, StackCommit: %lx\n",
InitialTeb->AllocatedStackBase, InitialTeb->StackBase, Stack, InitialTeb->AllocatedStackBase, InitialTeb->StackBase, Stack,
StackCommit); StackCommit);
@ -123,7 +123,7 @@ RtlpCreateUserStack(HANDLE hProcess,
/* Now set the current Stack Limit */ /* Now set the current Stack Limit */
InitialTeb->StackLimit = (PVOID)Stack; InitialTeb->StackLimit = (PVOID)Stack;
DPRINT("StackLimit: %p\n", Stack); DPRINT("StackLimit: %lx\n", Stack);
/* Create a guard page */ /* Create a guard page */
if (UseGuard) if (UseGuard)
@ -146,7 +146,7 @@ RtlpCreateUserStack(HANDLE hProcess,
/* Update the Stack Limit keeping in mind the Guard Page */ /* Update the Stack Limit keeping in mind the Guard Page */
InitialTeb->StackLimit = (PVOID)((ULONG_PTR)InitialTeb->StackLimit - InitialTeb->StackLimit = (PVOID)((ULONG_PTR)InitialTeb->StackLimit -
GuardPageSize); GuardPageSize);
DPRINT1("StackLimit: %p\n", Stack); DPRINT1("StackLimit: %lx\n", Stack);
} }
/* We are done! */ /* We are done! */
@ -192,9 +192,9 @@ RtlCreateUserThread(HANDLE ProcessHandle,
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
CONTEXT Context; CONTEXT Context;
DPRINT("RtlCreateUserThread: (hProcess: %lx, Suspended: %lx," DPRINT("RtlCreateUserThread: (hProcess: %p, Suspended: %d,"
"ZeroBits: %lx, StackReserve: %lx, StackCommit: %lx," "ZeroBits: %lx, StackReserve: %lx, StackCommit: %lx,"
"StartAddress: %p, Parameter: %lx)\n", ProcessHandle, "StartAddress: %p, Parameter: %p)\n", ProcessHandle,
CreateSuspended, StackZeroBits, StackReserve, StackCommit, CreateSuspended, StackZeroBits, StackReserve, StackCommit,
StartAddress, Parameter); StartAddress, Parameter);
@ -240,7 +240,7 @@ RtlCreateUserThread(HANDLE ProcessHandle,
} }
else else
{ {
DPRINT("Thread created: %lx\n", Handle); DPRINT("Thread created: %p\n", Handle);
if (ThreadHandle) *ThreadHandle = Handle; if (ThreadHandle) *ThreadHandle = Handle;
if (ClientId) *ClientId = ThreadCid; if (ClientId) *ClientId = ThreadCid;
} }
@ -261,7 +261,7 @@ RtlInitializeContext(IN HANDLE ProcessHandle,
IN PTHREAD_START_ROUTINE ThreadStartAddress, IN PTHREAD_START_ROUTINE ThreadStartAddress,
IN PINITIAL_TEB InitialTeb) IN PINITIAL_TEB InitialTeb)
{ {
DPRINT("RtlInitializeContext: (hProcess: %lx, ThreadContext: %p, Teb: %p\n", DPRINT("RtlInitializeContext: (hProcess: %p, ThreadContext: %p, Teb: %p\n",
ProcessHandle, ThreadContext, InitialTeb); ProcessHandle, ThreadContext, InitialTeb);
/* /*

View file

@ -175,7 +175,7 @@ RtlFindUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable,
/* Loop every entry which has valid entries */ /* Loop every entry which has valid entries */
while (CurrentEntry->NameLength) while (CurrentEntry->NameLength)
{ {
DPRINT("CurrentEntry->NameLength %lx\n", CurrentEntry->NameLength); DPRINT("CurrentEntry->NameLength 0x%x\n", CurrentEntry->NameLength);
/* Get the splay links and loop */ /* Get the splay links and loop */
SplayLinks = &CurrentEntry->Links; SplayLinks = &CurrentEntry->Links;
@ -189,7 +189,7 @@ RtlFindUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable,
/* Do the comparison */ /* Do the comparison */
Result = CompareUnicodeStrings(Entry->Prefix, FullName, 0); Result = CompareUnicodeStrings(Entry->Prefix, FullName, 0);
DPRINT("Result %lx\n", Result); DPRINT("Result 0x%x\n", Result);
if (Result == GenericGreaterThan) if (Result == GenericGreaterThan)
{ {
/* Prefix is greater, so restart on the left child */ /* Prefix is greater, so restart on the left child */