From 8efa6b64a6cacaad1647ce00739b04ba9fefa451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 6 Feb 2005 19:52:26 +0000 Subject: [PATCH] - Prevent image loading and symbol loading getting each others way - DPRINT1 is preferred over DbgPrint svn path=/trunk/; revision=13447 --- reactos/ntoskrnl/dbg/kdb_symbols.c | 4 ++-- reactos/ntoskrnl/ldr/sysdll.c | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/reactos/ntoskrnl/dbg/kdb_symbols.c b/reactos/ntoskrnl/dbg/kdb_symbols.c index bd2dfb35e67..3780be0d6df 100644 --- a/reactos/ntoskrnl/dbg/kdb_symbols.c +++ b/reactos/ntoskrnl/dbg/kdb_symbols.c @@ -450,10 +450,10 @@ KdbpSymLoadModuleSymbols(IN PUNICODE_STRING FileName, DPRINT("Attempting to open image: %wZ\n", FileName); Status = ZwOpenFile(&FileHandle, - FILE_ALL_ACCESS, + FILE_READ_ACCESS, &ObjectAttributes, &IoStatusBlock, - 0, + FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT|FILE_NO_INTERMEDIATE_BUFFERING); if (!NT_SUCCESS(Status)) { diff --git a/reactos/ntoskrnl/ldr/sysdll.c b/reactos/ntoskrnl/ldr/sysdll.c index ec928a776c2..9af2d009eef 100644 --- a/reactos/ntoskrnl/ldr/sysdll.c +++ b/reactos/ntoskrnl/ldr/sysdll.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -93,14 +93,14 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, NULL); DPRINT("Opening NTDLL\n"); Status = ZwOpenFile(&FileHandle, - FILE_ALL_ACCESS, + FILE_READ_ACCESS, &FileObjectAttributes, &Iosb, FILE_SHARE_READ, FILE_SYNCHRONOUS_IO_NONALERT); if (!NT_SUCCESS(Status)) { - DbgPrint("NTDLL open failed (Status %x)\n", Status); + DPRINT1("NTDLL open failed (Status %x)\n", Status); return Status; } Status = ZwReadFile(FileHandle, @@ -114,7 +114,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, 0); 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); return Status; } @@ -129,7 +129,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, || (DosHeader->e_lfanew == 0L) || (*(PULONG) NTHeaders != IMAGE_NT_SIGNATURE)) { - DbgPrint("NTDLL format invalid\n"); + DPRINT1("NTDLL format invalid\n"); ZwClose(FileHandle); return(STATUS_UNSUCCESSFUL); } @@ -149,7 +149,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, FileHandle); if (!NT_SUCCESS(Status)) { - DbgPrint("NTDLL create section failed (Status %x)\n", Status); + DPRINT1("NTDLL create section failed (Status %x)\n", Status); ZwClose(FileHandle); return(Status); } @@ -172,7 +172,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, PAGE_READWRITE); 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); return(Status); } @@ -186,7 +186,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, NULL); if (!NT_SUCCESS(Status)) { - DbgPrint("ObReferenceObjectByProcess() failed (Status %x)\n", Status); + DPRINT1("ObReferenceObjectByProcess() failed (Status %x)\n", Status); return(Status); } @@ -210,7 +210,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, &SystemDllEntryPoint); if (!NT_SUCCESS(Status)) { - DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); + DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status); if (Process != CurrentProcess) { KeDetachProcess(); @@ -235,7 +235,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, &SystemDllApcDispatcher); if (!NT_SUCCESS(Status)) { - DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); + DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status); if (Process != CurrentProcess) { KeDetachProcess(); @@ -259,7 +259,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, &SystemDllExceptionDispatcher); if (!NT_SUCCESS(Status)) { - DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); + DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status); if (Process != CurrentProcess) { KeDetachProcess(); @@ -283,7 +283,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, &SystemDllCallbackDispatcher); if (!NT_SUCCESS(Status)) { - DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); + DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status); if (Process != CurrentProcess) { KeDetachProcess(); @@ -307,7 +307,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, &SystemDllRaiseExceptionDispatcher); if (!NT_SUCCESS(Status)) { - DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); + DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status); if (Process != CurrentProcess) { KeDetachProcess();