- Properly set and check the image notification flag for the process in DbgkCreateThread. Patch by hto.

See issue #1879 for more details.

svn path=/trunk/; revision=25003
This commit is contained in:
Alex Ionescu 2006-11-30 19:52:49 +00:00
parent 9ab9cf7351
commit 7909b7a822
2 changed files with 7 additions and 5 deletions

View file

@ -104,10 +104,12 @@ DbgkCreateThread(PVOID StartAddress)
PTEB Teb;
PAGED_CODE();
/* Check if this process has already been notified */
ProcessFlags = InterlockedAnd((PLONG)&Process->Flags,
PSF_CREATE_REPORTED_BIT |
PSF_IMAGE_NOTIFY_DONE_BIT);
/* Try ORing in the create reported and image notify flags */
ProcessFlags = InterlockedOr((PLONG)&Process->Flags,
PSF_CREATE_REPORTED_BIT |
PSF_IMAGE_NOTIFY_DONE_BIT);
/* Check if we were the first to set them or if another thread raced us */
if (!(ProcessFlags & PSF_IMAGE_NOTIFY_DONE_BIT) && (PsImageNotifyEnabled))
{
/* It hasn't.. set up the image info for the process */

View file

@ -49,7 +49,7 @@ Main(VOID)
&ClientId);
Status = DbgUiDebugActiveProcess(hProcess);
#else
Error = DebugActiveProcess(2648);
Error = DebugActiveProcess(168);
#endif
#if NATIVE