From db10c69debdb84a2dfe1a13cf3734405643f2d4a Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Mon, 27 Dec 2010 07:46:48 +0000 Subject: [PATCH] [!] fixed : setExecutionStatus git-svn-id: https://pykd.svn.codeplex.com/svn@59201 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd/dbgcmd.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pykd/dbgcmd.h b/pykd/dbgcmd.h index 4de0f59..a245d21 100644 --- a/pykd/dbgcmd.h +++ b/pykd/dbgcmd.h @@ -23,10 +23,22 @@ setExecutionStatus() if ( FAILED( hres ) ) throw DbgException( "IDebugControl::SetExecutionStatus failed" ); - hres = dbgExt->control->WaitForEvent( 0, INFINITE ); + ULONG currentStatus; + + do { + + hres = dbgExt->control->WaitForEvent( 0, INFINITE ); - if ( FAILED( hres ) ) - throw DbgException( "IDebugControl::SetExecutionStatus failed" ); + if ( FAILED( hres ) ) + throw DbgException( "IDebugControl::SetExecutionStatus failed" ); + + hres = dbgExt->control->GetExecutionStatus( ¤tStatus ); + + if ( FAILED( hres ) ) + throw DbgException( "IDebugControl::GetExecutionStatus failed" ); + + + } while( currentStatus != DEBUG_STATUS_BREAK && currentStatus != DEBUG_STATUS_NO_DEBUGGEE ); } catch( std::exception &e )