- Apologies, forgot these two files for the Dbgk patch.

- Adds PsNtDllPathName constant string since we use it in two place (PsLocateSystemDll and DbgkpCreateThread).
- Adds PsImageNotifyEnabled boolean flag and sets it to true (although it should only be when a routine is installed, but ROS doesn't do this yet.

svn path=/trunk/; revision=24733
This commit is contained in:
Alex Ionescu 2006-11-12 22:36:21 +00:00
parent 29a0679654
commit 9bb38bc012
2 changed files with 11 additions and 4 deletions

View file

@ -11,10 +11,11 @@
#include <ntoskrnl.h>
#define NDEBUG
#include <internal/debug.h>
#include <debug.h>
/* GLOBALS *******************************************************************/
BOOLEAN PsImageNotifyEnabled = TRUE;
ULONG PspThreadNotifyRoutineCount;
PCREATE_THREAD_NOTIFY_ROUTINE
PspThreadNotifyRoutine[PSP_MAX_CREATE_THREAD_NOTIFY];

View file

@ -47,6 +47,9 @@ ANSI_STRING FastName = RTL_CONSTANT_STRING("KiFastSystemCall");
ANSI_STRING FastReturnName = RTL_CONSTANT_STRING("KiFastSystemCallRet");
ANSI_STRING InterruptName = RTL_CONSTANT_STRING("KiIntSystemCall");
UNICODE_STRING PsNtDllPathName =
RTL_CONSTANT_STRING(L"\\SystemRoot\\system32\\ntdll.dll");
PHANDLE_TABLE PspCidTable;
PEPROCESS PsInitialSystemProcess = NULL;
@ -159,7 +162,6 @@ NTSTATUS
NTAPI
PsLocateSystemDll(VOID)
{
UNICODE_STRING DllName = RTL_CONSTANT_STRING(L"\\SystemRoot\\system32\\ntdll.dll");
OBJECT_ATTRIBUTES ObjectAttributes;
IO_STATUS_BLOCK IoStatusBlock;
HANDLE FileHandle, SectionHandle;
@ -168,7 +170,11 @@ PsLocateSystemDll(VOID)
ULONG HardErrorResponse;
/* Locate and open NTDLL to determine ImageBase and LdrStartup */
InitializeObjectAttributes(&ObjectAttributes, &DllName, 0, NULL, NULL);
InitializeObjectAttributes(&ObjectAttributes,
&PsNtDllPathName,
0,
NULL,
NULL);
Status = ZwOpenFile(&FileHandle,
FILE_READ_ACCESS,
&ObjectAttributes,
@ -186,7 +192,7 @@ PsLocateSystemDll(VOID)
if (Status == STATUS_IMAGE_CHECKSUM_MISMATCH)
{
/* Raise a hard error */
HardErrorParameters = (ULONG_PTR)&DllName;
HardErrorParameters = (ULONG_PTR)&PsNtDllPathName;
NtRaiseHardError(Status,
1,
1,