- Add an initial breakpoint for usermode process startup, this makes usermode gdb debugging working. Spotted and tested by Yury Sidorov.

svn path=/trunk/; revision=34127
This commit is contained in:
Aleksey Bragin 2008-06-27 09:50:52 +00:00
parent f3b1615f45
commit e6e9edd880

View file

@ -484,6 +484,10 @@ LdrpInit(PCONTEXT Context,
ZwTerminateProcess(NtCurrentProcess(), STATUS_INVALID_IMAGE_FORMAT);
}
}
/* Break into debugger */
if (Peb->BeingDebugged) DbgBreakPoint();
/* attach the thread */
RtlEnterCriticalSection(NtCurrentPeb()->LoaderLock);
LdrpAttachThread();