- Prevent image loading and symbol loading getting each others way

- DPRINT1 is preferred over DbgPrint

svn path=/trunk/; revision=13447
This commit is contained in:
Gé van Geldorp 2005-02-06 19:52:26 +00:00
parent fa4b4f314a
commit 8efa6b64a6
2 changed files with 15 additions and 15 deletions

View file

@ -450,10 +450,10 @@ KdbpSymLoadModuleSymbols(IN PUNICODE_STRING FileName,
DPRINT("Attempting to open image: %wZ\n", FileName); DPRINT("Attempting to open image: %wZ\n", FileName);
Status = ZwOpenFile(&FileHandle, Status = ZwOpenFile(&FileHandle,
FILE_ALL_ACCESS, FILE_READ_ACCESS,
&ObjectAttributes, &ObjectAttributes,
&IoStatusBlock, &IoStatusBlock,
0, FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_SYNCHRONOUS_IO_NONALERT|FILE_NO_INTERMEDIATE_BUFFERING); FILE_SYNCHRONOUS_IO_NONALERT|FILE_NO_INTERMEDIATE_BUFFERING);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {

View file

@ -1,4 +1,4 @@
/* $Id:$ /* $Id$
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -93,14 +93,14 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
NULL); NULL);
DPRINT("Opening NTDLL\n"); DPRINT("Opening NTDLL\n");
Status = ZwOpenFile(&FileHandle, Status = ZwOpenFile(&FileHandle,
FILE_ALL_ACCESS, FILE_READ_ACCESS,
&FileObjectAttributes, &FileObjectAttributes,
&Iosb, &Iosb,
FILE_SHARE_READ, FILE_SHARE_READ,
FILE_SYNCHRONOUS_IO_NONALERT); FILE_SYNCHRONOUS_IO_NONALERT);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint("NTDLL open failed (Status %x)\n", Status); DPRINT1("NTDLL open failed (Status %x)\n", Status);
return Status; return Status;
} }
Status = ZwReadFile(FileHandle, Status = ZwReadFile(FileHandle,
@ -114,7 +114,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
0); 0);
if (!NT_SUCCESS(Status) || Iosb.Information != sizeof(BlockBuffer)) if (!NT_SUCCESS(Status) || Iosb.Information != sizeof(BlockBuffer))
{ {
DbgPrint("NTDLL header read failed (Status %x)\n", Status); DPRINT1("NTDLL header read failed (Status %x)\n", Status);
ZwClose(FileHandle); ZwClose(FileHandle);
return Status; return Status;
} }
@ -129,7 +129,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
|| (DosHeader->e_lfanew == 0L) || (DosHeader->e_lfanew == 0L)
|| (*(PULONG) NTHeaders != IMAGE_NT_SIGNATURE)) || (*(PULONG) NTHeaders != IMAGE_NT_SIGNATURE))
{ {
DbgPrint("NTDLL format invalid\n"); DPRINT1("NTDLL format invalid\n");
ZwClose(FileHandle); ZwClose(FileHandle);
return(STATUS_UNSUCCESSFUL); return(STATUS_UNSUCCESSFUL);
} }
@ -149,7 +149,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
FileHandle); FileHandle);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint("NTDLL create section failed (Status %x)\n", Status); DPRINT1("NTDLL create section failed (Status %x)\n", Status);
ZwClose(FileHandle); ZwClose(FileHandle);
return(Status); return(Status);
} }
@ -172,7 +172,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
PAGE_READWRITE); PAGE_READWRITE);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint("NTDLL map view of secion failed (Status %x)", Status); DPRINT1("NTDLL map view of secion failed (Status %x)", Status);
ZwClose(NTDllSectionHandle); ZwClose(NTDllSectionHandle);
return(Status); return(Status);
} }
@ -186,7 +186,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
NULL); NULL);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint("ObReferenceObjectByProcess() failed (Status %x)\n", Status); DPRINT1("ObReferenceObjectByProcess() failed (Status %x)\n", Status);
return(Status); return(Status);
} }
@ -210,7 +210,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
&SystemDllEntryPoint); &SystemDllEntryPoint);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status);
if (Process != CurrentProcess) if (Process != CurrentProcess)
{ {
KeDetachProcess(); KeDetachProcess();
@ -235,7 +235,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
&SystemDllApcDispatcher); &SystemDllApcDispatcher);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status);
if (Process != CurrentProcess) if (Process != CurrentProcess)
{ {
KeDetachProcess(); KeDetachProcess();
@ -259,7 +259,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
&SystemDllExceptionDispatcher); &SystemDllExceptionDispatcher);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status);
if (Process != CurrentProcess) if (Process != CurrentProcess)
{ {
KeDetachProcess(); KeDetachProcess();
@ -283,7 +283,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
&SystemDllCallbackDispatcher); &SystemDllCallbackDispatcher);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status);
if (Process != CurrentProcess) if (Process != CurrentProcess)
{ {
KeDetachProcess(); KeDetachProcess();
@ -307,7 +307,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
&SystemDllRaiseExceptionDispatcher); &SystemDllRaiseExceptionDispatcher);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status);
if (Process != CurrentProcess) if (Process != CurrentProcess)
{ {
KeDetachProcess(); KeDetachProcess();