From b41e5c3b6cae4739b1381ee74bc3d4abc9ebac13 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Thu, 30 Nov 2006 20:46:48 +0000 Subject: [PATCH] - Fix a bug in DbgkCreateThread which wasn't saving the initial thread information in the right place. The process create event is now fully supported and properly returns the entrypoint of the application. svn path=/trunk/; revision=25005 --- reactos/ntoskrnl/dbgk/dbgkutil.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/reactos/ntoskrnl/dbgk/dbgkutil.c b/reactos/ntoskrnl/dbgk/dbgkutil.c index 578b73d007f..c5218cd8839 100644 --- a/reactos/ntoskrnl/dbgk/dbgkutil.c +++ b/reactos/ntoskrnl/dbgk/dbgkutil.c @@ -178,8 +178,8 @@ DbgkCreateThread(PVOID StartAddress) if (!(ProcessFlags & PSF_CREATE_REPORTED_BIT)) { /* Setup the information structure for the new thread */ - CreateThread->SubSystemKey = 0; - CreateThread->StartAddress = NULL; + CreateProcess->InitialThread.SubSystemKey = 0; + CreateProcess->InitialThread.StartAddress = NULL; /* And for the new process */ CreateProcess->SubSystemKey = 0; @@ -194,10 +194,9 @@ DbgkCreateThread(PVOID StartAddress) if (NtHeader) { /* Fill out data from the header */ - CreateThread->StartAddress = (PVOID)((ULONG_PTR)NtHeader-> - OptionalHeader.ImageBase + - NtHeader->OptionalHeader. - AddressOfEntryPoint); + CreateProcess->InitialThread.StartAddress = + (PVOID)((ULONG_PTR)NtHeader->OptionalHeader.ImageBase + + NtHeader->OptionalHeader.AddressOfEntryPoint); CreateProcess->DebugInfoFileOffset = NtHeader->FileHeader. PointerToSymbolTable; CreateProcess->DebugInfoSize = NtHeader->FileHeader.