[FORMATTING] Fix indentation.

svn path=/trunk/; revision=38354
This commit is contained in:
Dmitry Gorbachev 2008-12-26 13:50:35 +00:00
parent fd4de76baf
commit 4d4d9e60fb

View file

@ -1,7 +1,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: lib/ntdll/ldr/startup.c * FILE: dll/ntdll/ldr/startup.c
* PURPOSE: Process startup for PE executables * PURPOSE: Process startup for PE executables
* PROGRAMMERS: Jean Michault * PROGRAMMERS: Jean Michault
* Rex Jolliff (rex@lvcablemodem.com) * Rex Jolliff (rex@lvcablemodem.com)
@ -14,28 +14,30 @@
#include <debug.h> #include <debug.h>
#include <win32k/callback.h> #include <win32k/callback.h>
VOID RtlInitializeHeapManager (VOID); VOID RtlInitializeHeapManager(VOID);
VOID LdrpInitLoader(VOID); VOID LdrpInitLoader(VOID);
VOID NTAPI RtlpInitDeferedCriticalSection(VOID); VOID NTAPI RtlpInitDeferedCriticalSection(VOID);
NTSTATUS LdrpAttachThread(VOID);
VOID RtlpInitializeVectoredExceptionHandling(VOID);
/* GLOBALS *******************************************************************/ /* GLOBALS *******************************************************************/
PLDR_DATA_TABLE_ENTRY ExeModule;
static RTL_CRITICAL_SECTION PebLock; static RTL_CRITICAL_SECTION PebLock;
static RTL_CRITICAL_SECTION LoaderLock; static RTL_CRITICAL_SECTION LoaderLock;
static RTL_BITMAP TlsBitMap; static RTL_BITMAP TlsBitMap;
static RTL_BITMAP TlsExpansionBitMap; static RTL_BITMAP TlsExpansionBitMap;
PLDR_DATA_TABLE_ENTRY ExeModule;
NTSTATUS LdrpAttachThread (VOID);
VOID RtlpInitializeVectoredExceptionHandling(VOID);
#define VALUE_BUFFER_SIZE 256 #define VALUE_BUFFER_SIZE 256
BOOLEAN FASTCALL /* FUNCTIONS *****************************************************************/
ReadCompatibilitySetting(HANDLE Key, LPWSTR Value, PKEY_VALUE_PARTIAL_INFORMATION ValueInfo, DWORD *Buffer)
BOOLEAN
FASTCALL
ReadCompatibilitySetting(HANDLE Key,
LPWSTR Value,
PKEY_VALUE_PARTIAL_INFORMATION ValueInfo,
DWORD * Buffer)
{ {
UNICODE_STRING ValueName; UNICODE_STRING ValueName;
NTSTATUS Status; NTSTATUS Status;
@ -54,12 +56,14 @@ ReadCompatibilitySetting(HANDLE Key, LPWSTR Value, PKEY_VALUE_PARTIAL_INFORMATIO
RtlFreeUnicodeString(&ValueName); RtlFreeUnicodeString(&ValueName);
return FALSE; return FALSE;
} }
RtlCopyMemory(Buffer, &ValueInfo->Data[0], sizeof(DWORD)); RtlCopyMemory(Buffer, &ValueInfo->Data[0], sizeof(DWORD));
RtlFreeUnicodeString(&ValueName); RtlFreeUnicodeString(&ValueName);
return TRUE; return TRUE;
} }
VOID FASTCALL VOID
FASTCALL
LoadImageFileExecutionOptions(PPEB Peb) LoadImageFileExecutionOptions(PPEB Peb)
{ {
NTSTATUS Status = STATUS_SUCCESS; NTSTATUS Status = STATUS_SUCCESS;
@ -78,6 +82,7 @@ LoadImageFileExecutionOptions(PPEB Peb)
ImagePathName = Peb->ProcessParameters->ImagePathName; ImagePathName = Peb->ProcessParameters->ImagePathName;
ImageName.Buffer = ImagePathName.Buffer + ImagePathName.Length / sizeof(WCHAR); ImageName.Buffer = ImagePathName.Buffer + ImagePathName.Length / sizeof(WCHAR);
ImageName.Length = 0; ImageName.Length = 0;
while (ImagePathName.Buffer < ImageName.Buffer) while (ImagePathName.Buffer < ImageName.Buffer)
{ {
ImageName.Buffer--; ImageName.Buffer--;
@ -87,13 +92,16 @@ LoadImageFileExecutionOptions(PPEB Peb)
break; break;
} }
} }
ImageName.Length = ImagePathName.Length - (ImageName.Buffer - ImagePathName.Buffer) * sizeof(WCHAR);
ImageName.MaximumLength = ImageName.Length + ImagePathName.MaximumLength - ImagePathName.Length; ImageName.Length = ImagePathName.Length -
(ImageName.Buffer - ImagePathName.Buffer) * sizeof(WCHAR);
ImageName.MaximumLength = ImageName.Length +
ImagePathName.MaximumLength - ImagePathName.Length;
DPRINT("%wZ\n", &ImageName); DPRINT("%wZ\n", &ImageName);
/* global flag */ /* global flag */
Status = LdrQueryImageFileExecutionOptions (&ImageName, Status = LdrQueryImageFileExecutionOptions(&ImageName,
L"GlobalFlag", L"GlobalFlag",
REG_SZ, REG_SZ,
(PVOID)ValueBuffer, (PVOID)ValueBuffer,
@ -118,10 +126,8 @@ LoadImageFileExecutionOptions(PPEB Peb)
} }
} }
BOOLEAN
FASTCALL
BOOLEAN FASTCALL
LoadCompatibilitySettings(PPEB Peb) LoadCompatibilitySettings(PPEB Peb)
{ {
NTSTATUS Status; NTSTATUS Status;
@ -136,13 +142,12 @@ LoadCompatibilitySettings(PPEB Peb)
PKEY_VALUE_PARTIAL_INFORMATION ValueInfo; PKEY_VALUE_PARTIAL_INFORMATION ValueInfo;
ULONG Length; ULONG Length;
DWORD MajorVersion, MinorVersion, BuildNumber, PlatformId, DWORD MajorVersion, MinorVersion, BuildNumber, PlatformId,
SPMajorVersion, SPMinorVersion= 0; SPMajorVersion, SPMinorVersion = 0;
if(Peb->ProcessParameters && if (Peb->ProcessParameters &&
(Peb->ProcessParameters->ImagePathName.Length > 0)) (Peb->ProcessParameters->ImagePathName.Length > 0))
{ {
Status = RtlOpenCurrentUser(KEY_READ, Status = RtlOpenCurrentUser(KEY_READ, &UserKey);
&UserKey);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
return FALSE; return FALSE;
@ -154,18 +159,17 @@ LoadCompatibilitySettings(PPEB Peb)
UserKey, UserKey,
NULL); NULL);
Status = NtOpenKey(&KeyHandle, Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE, &ObjectAttributes);
KEY_QUERY_VALUE,
&ObjectAttributes);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
if (UserKey) NtClose(UserKey); if (UserKey)
NtClose(UserKey);
return FALSE; return FALSE;
} }
/* query version name for application */ /* query version name for application */
ValueInfo = (PKEY_VALUE_PARTIAL_INFORMATION)ValueBuffer; ValueInfo = (PKEY_VALUE_PARTIAL_INFORMATION) ValueBuffer;
Status = NtQueryValueKey(KeyHandle, Status = NtQueryValueKey(KeyHandle,
&Peb->ProcessParameters->ImagePathName, &Peb->ProcessParameters->ImagePathName,
KeyValuePartialInformation, KeyValuePartialInformation,
@ -176,13 +180,14 @@ LoadCompatibilitySettings(PPEB Peb)
if (!NT_SUCCESS(Status) || (ValueInfo->Type != REG_SZ)) if (!NT_SUCCESS(Status) || (ValueInfo->Type != REG_SZ))
{ {
NtClose(KeyHandle); NtClose(KeyHandle);
if (UserKey) NtClose(UserKey); if (UserKey)
NtClose(UserKey);
return FALSE; return FALSE;
} }
ValueName.Length = ValueInfo->DataLength; ValueName.Length = ValueInfo->DataLength;
ValueName.MaximumLength = ValueInfo->DataLength; ValueName.MaximumLength = ValueInfo->DataLength;
ValueName.Buffer = (PWSTR)ValueInfo->Data; ValueName.Buffer = (PWSTR) ValueInfo->Data;
/* load version info */ /* load version info */
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
@ -191,52 +196,60 @@ LoadCompatibilitySettings(PPEB Peb)
KeyHandle, KeyHandle,
NULL); NULL);
Status = NtOpenKey(&SubKeyHandle, Status = NtOpenKey(&SubKeyHandle, KEY_QUERY_VALUE, &ObjectAttributes);
KEY_QUERY_VALUE,
&ObjectAttributes);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
NtClose(KeyHandle); NtClose(KeyHandle);
if (UserKey) NtClose(UserKey); if (UserKey)
NtClose(UserKey);
return FALSE; return FALSE;
} }
DPRINT("Loading version information for: %wZ\n", &ValueName); DPRINT("Loading version information for: %wZ\n", &ValueName);
/* read settings from registry */ /* read settings from registry */
if(!ReadCompatibilitySetting(SubKeyHandle, L"MajorVersion", ValueInfo, &MajorVersion)) if (!ReadCompatibilitySetting(SubKeyHandle, L"MajorVersion", ValueInfo, &MajorVersion))
goto finish; goto finish;
if(!ReadCompatibilitySetting(SubKeyHandle, L"MinorVersion", ValueInfo, &MinorVersion)) if (!ReadCompatibilitySetting(SubKeyHandle, L"MinorVersion", ValueInfo, &MinorVersion))
goto finish; goto finish;
if(!ReadCompatibilitySetting(SubKeyHandle, L"BuildNumber", ValueInfo, &BuildNumber)) if (!ReadCompatibilitySetting(SubKeyHandle, L"BuildNumber", ValueInfo, &BuildNumber))
goto finish; goto finish;
if(!ReadCompatibilitySetting(SubKeyHandle, L"PlatformId", ValueInfo, &PlatformId)) if (!ReadCompatibilitySetting(SubKeyHandle, L"PlatformId", ValueInfo, &PlatformId))
goto finish; goto finish;
/* now assign the settings */ /* now assign the settings */
Peb->OSMajorVersion = (ULONG)MajorVersion; Peb->OSMajorVersion = (ULONG) MajorVersion;
Peb->OSMinorVersion = (ULONG)MinorVersion; Peb->OSMinorVersion = (ULONG) MinorVersion;
Peb->OSBuildNumber = (USHORT)BuildNumber; Peb->OSBuildNumber = (USHORT) BuildNumber;
Peb->OSPlatformId = (ULONG)PlatformId; Peb->OSPlatformId = (ULONG) PlatformId;
/* optional service pack version numbers */ /* optional service pack version numbers */
if(ReadCompatibilitySetting(SubKeyHandle, L"SPMajorVersion", ValueInfo, &SPMajorVersion) && if (ReadCompatibilitySetting(SubKeyHandle,
ReadCompatibilitySetting(SubKeyHandle, L"SPMinorVersion", ValueInfo, &SPMinorVersion)) L"SPMajorVersion",
Peb->OSCSDVersion = ((SPMajorVersion & 0xFF) << 8) | (SPMinorVersion & 0xFF); ValueInfo,
&SPMajorVersion) &&
ReadCompatibilitySetting(SubKeyHandle,
L"SPMinorVersion",
ValueInfo,
&SPMinorVersion))
{
Peb->OSCSDVersion = ((SPMajorVersion & 0xFF) << 8) |
(SPMinorVersion & 0xFF);
}
finish: finish:
/* we're finished */ /* we're finished */
NtClose(SubKeyHandle); NtClose(SubKeyHandle);
NtClose(KeyHandle); NtClose(KeyHandle);
if (UserKey) NtClose(UserKey); if (UserKey)
NtClose(UserKey);
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }
/* FUNCTIONS *****************************************************************/
VOID VOID
NTAPI NTAPI
LdrpInit(PCONTEXT Context, LdrpInit(PCONTEXT Context,
@ -262,7 +275,7 @@ LdrpInit(PCONTEXT Context,
if (NtCurrentPeb()->Ldr == NULL) if (NtCurrentPeb()->Ldr == NULL)
{ {
if (ImageBase <= (PVOID)0x1000) if (ImageBase <= (PVOID) 0x1000)
{ {
DPRINT("ImageBase is null\n"); DPRINT("ImageBase is null\n");
ZwTerminateProcess(NtCurrentProcess(), STATUS_INVALID_IMAGE_FORMAT); ZwTerminateProcess(NtCurrentProcess(), STATUS_INVALID_IMAGE_FORMAT);
@ -281,14 +294,14 @@ LdrpInit(PCONTEXT Context,
} }
/* normalize process parameters */ /* normalize process parameters */
RtlNormalizeProcessParams (Peb->ProcessParameters); RtlNormalizeProcessParams(Peb->ProcessParameters);
/* Initialize NLS data */ /* Initialize NLS data */
RtlInitNlsTables (Peb->AnsiCodePageData, RtlInitNlsTables(Peb->AnsiCodePageData,
Peb->OemCodePageData, Peb->OemCodePageData,
Peb->UnicodeCaseTableData, Peb->UnicodeCaseTableData,
&NlsTable); &NlsTable);
RtlResetRtlTranslations (&NlsTable); RtlResetRtlTranslations(&NlsTable);
NTHeaders = (PIMAGE_NT_HEADERS)((ULONG_PTR)ImageBase + PEDosHeader->e_lfanew); NTHeaders = (PIMAGE_NT_HEADERS)((ULONG_PTR)ImageBase + PEDosHeader->e_lfanew);
@ -327,40 +340,36 @@ LdrpInit(PCONTEXT Context,
RtlpInitializeVectoredExceptionHandling(); RtlpInitializeVectoredExceptionHandling();
/* initalize peb lock support */ /* initalize peb lock support */
RtlInitializeCriticalSection (&PebLock); RtlInitializeCriticalSection(&PebLock);
Peb->FastPebLock = &PebLock; Peb->FastPebLock = &PebLock;
Peb->FastPebLockRoutine = (PPEBLOCKROUTINE)RtlEnterCriticalSection; Peb->FastPebLockRoutine = (PPEBLOCKROUTINE)RtlEnterCriticalSection;
Peb->FastPebUnlockRoutine = (PPEBLOCKROUTINE)RtlLeaveCriticalSection; Peb->FastPebUnlockRoutine = (PPEBLOCKROUTINE)RtlLeaveCriticalSection;
/* initialize tls bitmaps */ /* initialize tls bitmaps */
RtlInitializeBitMap (&TlsBitMap, RtlInitializeBitMap(&TlsBitMap, Peb->TlsBitmapBits, TLS_MINIMUM_AVAILABLE);
Peb->TlsBitmapBits, RtlInitializeBitMap(&TlsExpansionBitMap, Peb->TlsExpansionBitmapBits, TLS_EXPANSION_SLOTS);
TLS_MINIMUM_AVAILABLE);
RtlInitializeBitMap (&TlsExpansionBitMap,
Peb->TlsExpansionBitmapBits,
TLS_EXPANSION_SLOTS);
Peb->TlsBitmap = &TlsBitMap; Peb->TlsBitmap = &TlsBitMap;
Peb->TlsExpansionBitmap = &TlsExpansionBitMap; Peb->TlsExpansionBitmap = &TlsExpansionBitMap;
Peb->TlsExpansionCounter = TLS_MINIMUM_AVAILABLE; Peb->TlsExpansionCounter = TLS_MINIMUM_AVAILABLE;
/* Initialize table of callbacks for the kernel. */ /* Initialize table of callbacks for the kernel. */
Peb->KernelCallbackTable = Peb->KernelCallbackTable = RtlAllocateHeap(RtlGetProcessHeap(),
RtlAllocateHeap(RtlGetProcessHeap(),
0, 0,
sizeof(PVOID) * (USER32_CALLBACK_MAXIMUM + 1)); sizeof(PVOID) *
(USER32_CALLBACK_MAXIMUM + 1));
if (Peb->KernelCallbackTable == NULL) if (Peb->KernelCallbackTable == NULL)
{ {
DPRINT1("Failed to create callback table\n"); DPRINT1("Failed to create callback table\n");
ZwTerminateProcess(NtCurrentProcess(),STATUS_INSUFFICIENT_RESOURCES); ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES);
} }
/* initalize loader lock */ /* initalize loader lock */
RtlInitializeCriticalSection (&LoaderLock); RtlInitializeCriticalSection(&LoaderLock);
Peb->LoaderLock = &LoaderLock; Peb->LoaderLock = &LoaderLock;
/* create loader information */ /* create loader information */
Peb->Ldr = (PPEB_LDR_DATA)RtlAllocateHeap (Peb->ProcessHeap, Peb->Ldr = (PPEB_LDR_DATA) RtlAllocateHeap(Peb->ProcessHeap,
0, 0,
sizeof(PEB_LDR_DATA)); sizeof(PEB_LDR_DATA));
if (Peb->Ldr == NULL) if (Peb->Ldr == NULL)
@ -368,6 +377,7 @@ LdrpInit(PCONTEXT Context,
DPRINT1("Failed to create loader data\n"); DPRINT1("Failed to create loader data\n");
ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES); ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES);
} }
Peb->Ldr->Length = sizeof(PEB_LDR_DATA); Peb->Ldr->Length = sizeof(PEB_LDR_DATA);
Peb->Ldr->Initialized = FALSE; Peb->Ldr->Initialized = FALSE;
Peb->Ldr->SsHandle = NULL; Peb->Ldr->SsHandle = NULL;
@ -382,11 +392,12 @@ LdrpInit(PCONTEXT Context,
LoadImageFileExecutionOptions(Peb); LoadImageFileExecutionOptions(Peb);
/* build full ntdll path */ /* build full ntdll path */
wcscpy (FullNtDllPath, SharedUserData->NtSystemRoot); wcscpy(FullNtDllPath, SharedUserData->NtSystemRoot);
wcscat (FullNtDllPath, L"\\system32\\ntdll.dll"); wcscat(FullNtDllPath, L"\\system32\\ntdll.dll");
/* add entry for ntdll */ /* add entry for ntdll */
NtModule = (PLDR_DATA_TABLE_ENTRY)RtlAllocateHeap (Peb->ProcessHeap, NtModule = (PLDR_DATA_TABLE_ENTRY)
RtlAllocateHeap(Peb->ProcessHeap,
0, 0,
sizeof(LDR_DATA_TABLE_ENTRY)); sizeof(LDR_DATA_TABLE_ENTRY));
if (NtModule == NULL) if (NtModule == NULL)
@ -398,18 +409,16 @@ LdrpInit(PCONTEXT Context,
NtModule->DllBase = BaseAddress; NtModule->DllBase = BaseAddress;
NtModule->EntryPoint = 0; /* no entry point */ NtModule->EntryPoint = 0; /* no entry point */
RtlCreateUnicodeString (&NtModule->FullDllName, RtlCreateUnicodeString(&NtModule->FullDllName, FullNtDllPath);
FullNtDllPath); RtlCreateUnicodeString(&NtModule->BaseDllName, L"ntdll.dll");
RtlCreateUnicodeString (&NtModule->BaseDllName, NtModule->Flags = LDRP_IMAGE_DLL | LDRP_ENTRY_PROCESSED;
L"ntdll.dll");
NtModule->Flags = LDRP_IMAGE_DLL|LDRP_ENTRY_PROCESSED;
NtModule->LoadCount = -1; /* don't unload */ NtModule->LoadCount = -1; /* don't unload */
NtModule->TlsIndex = -1; NtModule->TlsIndex = -1;
NtModule->SectionPointer = NULL; NtModule->SectionPointer = NULL;
NtModule->CheckSum = 0; NtModule->CheckSum = 0;
NTHeaders = RtlImageNtHeader (NtModule->DllBase); NTHeaders = RtlImageNtHeader(NtModule->DllBase);
NtModule->SizeOfImage = LdrpGetResidentSize(NTHeaders); NtModule->SizeOfImage = LdrpGetResidentSize(NTHeaders);
NtModule->TimeDateStamp = NTHeaders->FileHeader.TimeDateStamp; NtModule->TimeDateStamp = NTHeaders->FileHeader.TimeDateStamp;
@ -428,7 +437,8 @@ LdrpInit(PCONTEXT Context,
if (NtCurrentPeb()->Ldr->Initialized == FALSE) if (NtCurrentPeb()->Ldr->Initialized == FALSE)
{ {
/* add entry for executable (becomes first list entry) */ /* add entry for executable (becomes first list entry) */
ExeModule = (PLDR_DATA_TABLE_ENTRY)RtlAllocateHeap (Peb->ProcessHeap, ExeModule = (PLDR_DATA_TABLE_ENTRY)
RtlAllocateHeap(Peb->ProcessHeap,
0, 0,
sizeof(LDR_DATA_TABLE_ENTRY)); sizeof(LDR_DATA_TABLE_ENTRY));
if (ExeModule == NULL) if (ExeModule == NULL)
@ -436,13 +446,14 @@ LdrpInit(PCONTEXT Context,
DPRINT1("Failed to create loader module infomation\n"); DPRINT1("Failed to create loader module infomation\n");
ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES); ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES);
} }
ExeModule->DllBase = Peb->ImageBaseAddress; ExeModule->DllBase = Peb->ImageBaseAddress;
if ((Peb->ProcessParameters == NULL) || if ((Peb->ProcessParameters == NULL) ||
(Peb->ProcessParameters->ImagePathName.Length == 0)) (Peb->ProcessParameters->ImagePathName.Length == 0))
{ {
DPRINT1("Failed to access the process parameter block\n"); DPRINT1("Failed to access the process parameter block\n");
ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL); ZwTerminateProcess(NtCurrentProcess(), STATUS_UNSUCCESSFUL);
} }
RtlCreateUnicodeString(&ExeModule->FullDllName, RtlCreateUnicodeString(&ExeModule->FullDllName,
@ -450,9 +461,7 @@ LdrpInit(PCONTEXT Context,
RtlCreateUnicodeString(&ExeModule->BaseDllName, RtlCreateUnicodeString(&ExeModule->BaseDllName,
wcsrchr(ExeModule->FullDllName.Buffer, L'\\') + 1); wcsrchr(ExeModule->FullDllName.Buffer, L'\\') + 1);
DPRINT("BaseDllName '%wZ' FullDllName '%wZ'\n", DPRINT("BaseDllName '%wZ' FullDllName '%wZ'\n", &ExeModule->BaseDllName, &ExeModule->FullDllName);
&ExeModule->BaseDllName,
&ExeModule->FullDllName);
ExeModule->Flags = LDRP_ENTRY_PROCESSED; ExeModule->Flags = LDRP_ENTRY_PROCESSED;
ExeModule->LoadCount = -1; /* don't unload */ ExeModule->LoadCount = -1; /* don't unload */
@ -460,7 +469,7 @@ LdrpInit(PCONTEXT Context,
ExeModule->SectionPointer = NULL; ExeModule->SectionPointer = NULL;
ExeModule->CheckSum = 0; ExeModule->CheckSum = 0;
NTHeaders = RtlImageNtHeader (ExeModule->DllBase); NTHeaders = RtlImageNtHeader(ExeModule->DllBase);
ExeModule->SizeOfImage = LdrpGetResidentSize(NTHeaders); ExeModule->SizeOfImage = LdrpGetResidentSize(NTHeaders);
ExeModule->TimeDateStamp = NTHeaders->FileHeader.TimeDateStamp; ExeModule->TimeDateStamp = NTHeaders->FileHeader.TimeDateStamp;
@ -489,7 +498,8 @@ LdrpInit(PCONTEXT Context,
} }
/* Break into debugger */ /* Break into debugger */
if (Peb->BeingDebugged) DbgBreakPoint(); if (Peb->BeingDebugged)
DbgBreakPoint();
} }
/* attach the thread */ /* attach the thread */