forked from qt-creator/qt-creator
Debugger: Fix crash on ramp down
Change-Id: I76aab19d92eae10823196a4c6dc9a2c400d47e80 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1084,6 +1084,7 @@ void DebuggerEnginePrivate::doShutdownEngine()
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(isMasterEngine(), qDebug() << m_engine; return);
|
QTC_ASSERT(isMasterEngine(), qDebug() << m_engine; return);
|
||||||
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << m_engine << state());
|
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << m_engine << state());
|
||||||
|
QTC_ASSERT(runTool(), return);
|
||||||
runTool()->startDying();
|
runTool()->startDying();
|
||||||
m_engine->showMessage("CALL: SHUTDOWN ENGINE");
|
m_engine->showMessage("CALL: SHUTDOWN ENGINE");
|
||||||
m_engine->shutdownEngine();
|
m_engine->shutdownEngine();
|
||||||
@@ -1142,37 +1143,39 @@ void DebuggerEnginePrivate::setRemoteSetupState(RemoteSetupState state)
|
|||||||
|
|
||||||
void DebuggerEngine::notifyEngineIll()
|
void DebuggerEngine::notifyEngineIll()
|
||||||
{
|
{
|
||||||
#ifdef WITH_BENCHMARK
|
runControl()->initiateStop();
|
||||||
CALLGRIND_STOP_INSTRUMENTATION;
|
return;
|
||||||
CALLGRIND_DUMP_STATS;
|
//#ifdef WITH_BENCHMARK
|
||||||
#endif
|
// CALLGRIND_STOP_INSTRUMENTATION;
|
||||||
showMessage("NOTE: ENGINE ILL ******");
|
// CALLGRIND_DUMP_STATS;
|
||||||
runTool()->startDying();
|
//#endif
|
||||||
d->m_lastGoodState = d->m_state;
|
// showMessage("NOTE: ENGINE ILL ******");
|
||||||
switch (state()) {
|
// runTool()->startDying();
|
||||||
case InferiorRunRequested:
|
// d->m_lastGoodState = d->m_state;
|
||||||
case InferiorRunOk:
|
// switch (state()) {
|
||||||
// The engine does not look overly ill right now, so attempt to
|
// case InferiorRunRequested:
|
||||||
// properly interrupt at least once. If that fails, we are on the
|
// case InferiorRunOk:
|
||||||
// shutdown path due to d->m_targetState anyways.
|
// // The engine does not look overly ill right now, so attempt to
|
||||||
setState(InferiorStopRequested, true);
|
// // properly interrupt at least once. If that fails, we are on the
|
||||||
showMessage("ATTEMPT TO INTERRUPT INFERIOR");
|
// // shutdown path due to d->m_targetState anyways.
|
||||||
interruptInferior();
|
// setState(InferiorStopRequested, true);
|
||||||
break;
|
// showMessage("ATTEMPT TO INTERRUPT INFERIOR");
|
||||||
case InferiorStopRequested:
|
// interruptInferior();
|
||||||
notifyInferiorStopFailed();
|
// break;
|
||||||
break;
|
// case InferiorStopRequested:
|
||||||
case InferiorStopOk:
|
// notifyInferiorStopFailed();
|
||||||
showMessage("FORWARDING STATE TO InferiorShutdownFailed");
|
// break;
|
||||||
setState(InferiorShutdownFailed, true);
|
// case InferiorStopOk:
|
||||||
if (isMasterEngine())
|
// showMessage("FORWARDING STATE TO InferiorShutdownFailed");
|
||||||
d->queueShutdownEngine();
|
// setState(InferiorShutdownFailed, true);
|
||||||
break;
|
// if (isMasterEngine())
|
||||||
default:
|
// d->queueShutdownEngine();
|
||||||
if (isMasterEngine())
|
// break;
|
||||||
d->queueShutdownEngine();
|
// default:
|
||||||
break;
|
// if (isMasterEngine())
|
||||||
}
|
// d->queueShutdownEngine();
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerEngine::notifyEngineSpontaneousShutdown()
|
void DebuggerEngine::notifyEngineSpontaneousShutdown()
|
||||||
|
|||||||
Reference in New Issue
Block a user