From d4cf4b1b584371adddcc6af1cb830a123f0b3596 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Thu, 30 Nov 2006 04:52:22 +0000 Subject: [PATCH] - Fix a bug in NtWaitForDebugEvent. - Dbgk kindaaaa works now, as a proof-of-concept more then anything else since some helper Mm routines are missing. Still have some bugs to fix, but connecting, attaching and waiting on events seems not to crash anymore (And returns partially valid data). svn path=/trunk/; revision=24984 --- reactos/ntoskrnl/dbgk/debug.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/dbgk/debug.c b/reactos/ntoskrnl/dbgk/debug.c index ac6c8551c10..4c7087bd04d 100644 --- a/reactos/ntoskrnl/dbgk/debug.c +++ b/reactos/ntoskrnl/dbgk/debug.c @@ -1868,8 +1868,6 @@ NtWaitForDebugEvent(IN HANDLE DebugHandle, PreviousMode, Alertable, Timeout); - - /* Start the wait loop */ while (TRUE) { if (!NT_SUCCESS(Status) || @@ -1988,10 +1986,11 @@ NtWaitForDebugEvent(IN HANDLE DebugHandle, DbgkpOpenHandles(&WaitStateChange, Process, Thread); ObDereferenceObject(Process); ObDereferenceObject(Thread); + break; } } - /* We're, dereference the object */ + /* We're done, dereference the object */ ObDereferenceObject(DebugObject); /* Protect write with SEH */