Commit b1e208b5 authored by ussrhero's avatar ussrhero

fixed closeDump routine affected some tests

parent e1bceada
......@@ -187,9 +187,13 @@ DebugCallbackResult ClrDebugManagerImpl::onProcessStart(PROCESS_DEBUG_ID process
{
boost::recursive_mutex::scoped_lock lock(m_processLock);
PROCESS_ID pid = TargetProcess::getById(processid)->getSystemId();
auto process = TargetProcess::getById(processid);
m_processMap[pid] = 0;
if (!process->isKernelDebugging())
{
PROCESS_ID pid = TargetProcess::getById(processid)->getSystemId();
m_processMap[pid] = 0;
}
return DebugCallbackNoChange;
}
......@@ -198,9 +202,13 @@ DebugCallbackResult ClrDebugManagerImpl::onProcessStart(PROCESS_DEBUG_ID process
DebugCallbackResult ClrDebugManagerImpl::onProcessExit( PROCESS_DEBUG_ID processid, ProcessExitReason reason, unsigned long exitCode )
{
PROCESS_ID pid = TargetProcess::getById(processid)->getSystemId();
auto process = TargetProcess::getById(processid);
m_processMap.erase(pid);
if (!process->isKernelDebugging())
{
PROCESS_ID pid = TargetProcess::getById(processid)->getSystemId();
m_processMap.erase(pid);
}
return DebugCallbackNoChange;
}
......
......@@ -403,7 +403,7 @@ PROCESS_DEBUG_ID loadDump( const std::wstring &fileName )
if ( FAILED( hres ) )
throw DbgEngException( L"IDebugSystemObjects::GetCurrentProcessId", hres );
// ProcessMonitor::processStart(processId);
ProcessMonitor::processStart(processId);
return processId;
}
......@@ -422,12 +422,12 @@ void closeDump( PROCESS_DEBUG_ID processId )
throw DbgEngException( L"IDebugSystemObjects::SetCurrentProcessId", hres );
}
ProcessMonitor::processStop(processId, ProcessDetach, 0);
hres = g_dbgMgr->client->TerminateCurrentProcess();
if ( FAILED( hres ) )
throw DbgEngException( L"IDebugClient::TerminateCurrentProcess", hres );
// ProcessMonitor::processStop(processId, ProcessDetach, 0);
if ( ProcessMonitor::getNumberProcesses() == 0 )
g_dbgMgr->ChangeEngineState( DEBUG_CES_EXECUTION_STATUS, DEBUG_STATUS_NO_DEBUGGEE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment