* Fix several print specifiers.
* Add missing Status variable to a DPRINT1.

svn path=/trunk/; revision=59883
This commit is contained in:
Amine Khaldi 2013-08-29 21:12:40 +00:00
parent 103ab26886
commit 80cb32f995
4 changed files with 25 additions and 25 deletions

View file

@ -310,14 +310,14 @@ LdrLoadDll(IN PWSTR SearchPath OPTIONAL,
if ((ShowSnaps) || (LdrpShowRecursiveLoads) || (LdrpBreakOnRecursiveDllLoads))
{
/* Print out debug messages */
DPRINT1("[%lx, %lx] LDR: Recursive DLL Load\n",
DPRINT1("[%p, %p] LDR: Recursive DLL Load\n",
Teb->RealClientId.UniqueProcess,
Teb->RealClientId.UniqueThread);
DPRINT1("[%lx, %lx] Previous DLL being loaded \"%wZ\"\n",
DPRINT1("[%p, %p] Previous DLL being loaded \"%wZ\"\n",
Teb->RealClientId.UniqueProcess,
Teb->RealClientId.UniqueThread,
OldTldDll);
DPRINT1("[%lx, %lx] DLL being requested \"%wZ\"\n",
DPRINT1("[%p, %p] DLL being requested \"%wZ\"\n",
Teb->RealClientId.UniqueProcess,
Teb->RealClientId.UniqueThread,
DllName);
@ -325,13 +325,13 @@ LdrLoadDll(IN PWSTR SearchPath OPTIONAL,
/* Was it initializing too? */
if (!LdrpCurrentDllInitializer)
{
DPRINT1("[%lx, %lx] LDR: No DLL Initializer was running\n",
DPRINT1("[%p, %p] LDR: No DLL Initializer was running\n",
Teb->RealClientId.UniqueProcess,
Teb->RealClientId.UniqueThread);
}
else
{
DPRINT1("[%lx, %lx] DLL whose initializer was currently running \"%wZ\"\n",
DPRINT1("[%p, %p] DLL whose initializer was currently running \"%wZ\"\n",
Teb->ClientId.UniqueProcess,
Teb->ClientId.UniqueThread,
&LdrpCurrentDllInitializer->BaseDllName);
@ -1247,7 +1247,7 @@ quickie:
(Status != STATUS_DLL_NOT_FOUND) &&
(Status != STATUS_OBJECT_NAME_NOT_FOUND)))
{
DPRINT1("LDR: LdrAddRefDll(%p) 0x%08lx\n", BaseAddress);
DPRINT1("LDR: LdrAddRefDll(%p) 0x%08lx\n", BaseAddress, Status);
}
}
@ -1345,7 +1345,7 @@ LdrUnloadDll(IN PVOID BaseAddress)
/* Show message */
if (ShowSnaps)
{
DPRINT1("(%d) [%ws] %ws (%lx) deinit %lx\n",
DPRINT1("(%lu) [%ws] %ws (%lx) deinit %p\n",
LdrpActiveUnloadCount,
LdrEntry->BaseDllName.Buffer,
LdrEntry->FullDllName.Buffer,
@ -1407,7 +1407,7 @@ LdrUnloadDll(IN PVOID BaseAddress)
/* Show message */
if (ShowSnaps)
{
DPRINT1("LDR: Calling deinit %lx\n", EntryPoint);
DPRINT1("LDR: Calling deinit %p\n", EntryPoint);
}
/* Set up the Act Ctx */

View file

@ -501,7 +501,7 @@ LdrpInitializeThread(IN PCONTEXT Context)
NTSTATUS Status;
PVOID EntryPoint;
DPRINT("LdrpInitializeThread() called for %wZ (%lx/%lx)\n",
DPRINT("LdrpInitializeThread() called for %wZ (%p/%p)\n",
&LdrpImageEntry->BaseDllName,
NtCurrentTeb()->RealClientId.UniqueProcess,
NtCurrentTeb()->RealClientId.UniqueThread);
@ -566,7 +566,7 @@ LdrpInitializeThread(IN PCONTEXT Context)
if (!LdrpShutdownInProgress)
{
/* Call the Entrypoint */
DPRINT("%wZ - Calling entry point at %p for thread attaching, %lx/%lx\n",
DPRINT("%wZ - Calling entry point at %p for thread attaching, %p/%p\n",
&LdrEntry->BaseDllName, LdrEntry->EntryPoint,
NtCurrentTeb()->RealClientId.UniqueProcess,
NtCurrentTeb()->RealClientId.UniqueThread);
@ -626,7 +626,7 @@ LdrpRunInitializeRoutines(IN PCONTEXT Context OPTIONAL)
PTEB OldTldTeb;
BOOLEAN DllStatus;
DPRINT("LdrpRunInitializeRoutines() called for %wZ (%lx/%lx)\n",
DPRINT("LdrpRunInitializeRoutines() called for %wZ (%p/%p)\n",
&LdrpImageEntry->BaseDllName,
NtCurrentTeb()->RealClientId.UniqueProcess,
NtCurrentTeb()->RealClientId.UniqueThread);
@ -661,7 +661,7 @@ LdrpRunInitializeRoutines(IN PCONTEXT Context OPTIONAL)
/* Show debug message */
if (ShowSnaps)
{
DPRINT1("[%x,%x] LDR: Real INIT LIST for Process %wZ\n",
DPRINT1("[%p,%p] LDR: Real INIT LIST for Process %wZ\n",
NtCurrentTeb()->RealClientId.UniqueThread,
NtCurrentTeb()->RealClientId.UniqueProcess,
&Peb->ProcessParameters->ImagePathName);
@ -695,7 +695,7 @@ LdrpRunInitializeRoutines(IN PCONTEXT Context OPTIONAL)
/* Display debug message */
if (ShowSnaps)
{
DPRINT1("[%x,%x] LDR: %wZ init routine %p\n",
DPRINT1("[%p,%p] LDR: %wZ init routine %p\n",
NtCurrentTeb()->RealClientId.UniqueThread,
NtCurrentTeb()->RealClientId.UniqueProcess,
&LdrEntry->FullDllName,
@ -963,7 +963,7 @@ LdrShutdownProcess(VOID)
}
/* Call the Entrypoint */
DPRINT("%wZ - Calling entry point at %x for thread detaching\n",
DPRINT("%wZ - Calling entry point at %p for thread detaching\n",
&LdrEntry->BaseDllName, LdrEntry->EntryPoint);
LdrpCallInitRoutine(EntryPoint,
LdrEntry->DllBase,
@ -1078,7 +1078,7 @@ LdrShutdownThread(VOID)
if (!LdrpShutdownInProgress)
{
/* Call the Entrypoint */
DPRINT("%wZ - Calling entry point at %x for thread detaching\n",
DPRINT("%wZ - Calling entry point at %p for thread detaching\n",
&LdrEntry->BaseDllName, LdrEntry->EntryPoint);
LdrpCallInitRoutine(EntryPoint,
LdrEntry->DllBase,
@ -1253,7 +1253,7 @@ LdrpAllocateTls(VOID)
/* Show debug message */
if (ShowSnaps)
{
DPRINT1("LDR: TlsVector %x Index %d = %x copied from %x to %x\n",
DPRINT1("LDR: TlsVector %p Index %lu = %p copied from %x to %p\n",
TlsVector,
TlsData->TlsDirectory.Characteristics,
&TlsVector[TlsData->TlsDirectory.Characteristics],
@ -1605,7 +1605,7 @@ LdrpInitializeProcess(IN PCONTEXT Context,
/* Start verbose debugging messages right now if they were requested */
if (ShowSnaps)
{
DPRINT1("LDR: PID: 0x%x started - '%wZ'\n",
DPRINT1("LDR: PID: 0x%p started - '%wZ'\n",
Teb->ClientId.UniqueProcess,
&CommandLine);
}
@ -2146,7 +2146,7 @@ LdrpInit(PCONTEXT Context,
MEMORY_BASIC_INFORMATION MemoryBasicInfo;
PPEB Peb = NtCurrentPeb();
DPRINT("LdrpInit() %lx/%lx\n",
DPRINT("LdrpInit() %p/%p\n",
NtCurrentTeb()->RealClientId.UniqueProcess,
NtCurrentTeb()->RealClientId.UniqueThread);

View file

@ -47,7 +47,7 @@ LdrpSnapIAT(IN PLDR_DATA_TABLE_ENTRY ExportLdrEntry,
LPSTR ImportName;
ULONG ForwarderChain, i, Rva, OldProtect, IatSize, ExportSize;
SIZE_T ImportSize;
DPRINT("LdrpSnapIAT(%wZ %wZ %p %d)\n", &ExportLdrEntry->BaseDllName, &ImportLdrEntry->BaseDllName, IatEntry, EntriesValid);
DPRINT("LdrpSnapIAT(%wZ %wZ %p %u)\n", &ExportLdrEntry->BaseDllName, &ImportLdrEntry->BaseDllName, IatEntry, EntriesValid);
/* Get export directory */
ExportDirectory = RtlImageDirectoryEntryToData(ExportLdrEntry->DllBase,
@ -689,7 +689,7 @@ LdrpWalkImportDescriptor(IN LPWSTR DllPath OPTIONAL,
PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundEntry = NULL;
PIMAGE_IMPORT_DESCRIPTOR ImportEntry;
ULONG BoundSize, IatSize;
DPRINT("LdrpWalkImportDescriptor('%S' %x)\n", DllPath, LdrEntry);
DPRINT("LdrpWalkImportDescriptor('%S' %p)\n", DllPath, LdrEntry);
/* Set up the Act Ctx */
RtlZeroMemory(&ActCtx, sizeof(ActCtx));

View file

@ -303,7 +303,7 @@ LdrpUpdateLoadCount3(IN PLDR_DATA_TABLE_ENTRY LdrEntry,
/* Show snaps */
if (ShowSnaps)
{
DPRINT1("LDR: Flags %d %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount);
DPRINT1("LDR: Flags %lu %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount);
}
}
@ -347,7 +347,7 @@ LdrpUpdateLoadCount3(IN PLDR_DATA_TABLE_ENTRY LdrEntry,
/* Show snaps */
if (ShowSnaps)
{
DPRINT1("LDR: Flags %d %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount);
DPRINT1("LDR: Flags %lu %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount);
}
}
@ -416,7 +416,7 @@ LdrpUpdateLoadCount3(IN PLDR_DATA_TABLE_ENTRY LdrEntry,
/* Show snaps */
if (ShowSnaps)
{
DPRINT1("LDR: Flags %d %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount);
DPRINT1("LDR: Flags %lu %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount);
}
}
@ -1319,7 +1319,7 @@ SkipCheck:
ImageBase = (ULONG_PTR)NtHeaders->OptionalHeader.ImageBase;
ImageEnd = ImageBase + ViewSize;
DPRINT1("LDR: LdrpMapDll Relocating Image Name %ws (%p -> %p)\n", DllName, ImageBase, ViewBase);
DPRINT1("LDR: LdrpMapDll Relocating Image Name %ws (%lu -> %p)\n", DllName, ImageBase, ViewBase);
/* Scan all the modules */
ListHead = &Peb->Ldr->InLoadOrderModuleList;
@ -1978,7 +1978,7 @@ LdrpCheckForLoadedDll(IN PWSTR DllPath,
PVOID ViewBase = NULL;
SIZE_T ViewSize = 0;
PIMAGE_NT_HEADERS NtHeader, NtHeader2;
DPRINT("LdrpCheckForLoadedDll('%S' '%wZ' %d %d %p)\n", DllPath ? ((ULONG_PTR)DllPath == 1 ? L"" : DllPath) : L"", DllName, Flag, RedirectedDll, LdrEntry);
DPRINT("LdrpCheckForLoadedDll('%S' '%wZ' %u %u %p)\n", DllPath ? ((ULONG_PTR)DllPath == 1 ? L"" : DllPath) : L"", DllName, Flag, RedirectedDll, LdrEntry);
/* Check if a dll name was provided */
if (!(DllName->Buffer) || !(DllName->Buffer[0])) return FALSE;