[2.0.x] + DEBUG_ENGOPT_INITIAL_BREAK for attachKernel

git-svn-id: https://pykd.svn.codeplex.com/svn@85045 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\EreTIk_cp 2013-09-02 16:14:14 +00:00 committed by Mikhail I. Izmestev
parent 116e45c989
commit b31456877d

View File

@ -88,7 +88,17 @@ void attachKernel( const std::string &connectOptions )
{ {
PyThread_StateRestore pyThreadRestore( g_dbgEng->pystate ); PyThread_StateRestore pyThreadRestore( g_dbgEng->pystate );
HRESULT hres = ULONG opt;
HRESULT hres = g_dbgEng->control->GetEngineOptions( &opt );
if ( FAILED( hres ) )
throw DbgException( "IDebugControl::GetEngineOptions", hres );
opt |= DEBUG_ENGOPT_INITIAL_BREAK;
hres = g_dbgEng->control->SetEngineOptions( opt );
if ( FAILED( hres ) )
throw DbgException( "IDebugControl::SetEngineOptions", hres );
hres =
g_dbgEng->client->AttachKernel( g_dbgEng->client->AttachKernel(
connectOptions.empty() ? DEBUG_ATTACH_LOCAL_KERNEL : DEBUG_ATTACH_KERNEL_CONNECTION, connectOptions.empty() ? DEBUG_ATTACH_LOCAL_KERNEL : DEBUG_ATTACH_KERNEL_CONNECTION,
connectOptions.empty() ? NULL : connectOptions.c_str()); connectOptions.empty() ? NULL : connectOptions.c_str());