Commit e8a1aca8 authored by hjk's avatar hjk
Browse files

debugger: handle forced shutdown in "running" state gracefully

Reviewed-by: Friedemann Kleint
Task-number: QTCREATORBUG-2681
parent dfdb9b14
......@@ -1414,15 +1414,23 @@ void DebuggerEngine::notifyEngineIll()
switch (state()) {
case InferiorRunRequested:
case InferiorRunOk:
// The engine does not look overly ill right now, so attempt to
// properly interrupt at least once. If that fails, we are on the
// shutdown path due to d->m_targetState anyways.
setState(InferiorStopRequested, true);
showMessage(_("ATTEMPT TO INTERRUPT INFERIOR"));
interruptInferior();
break;
case InferiorStopRequested:
case InferiorStopOk:
qDebug() << "FORWARDING STATE TO " << InferiorShutdownFailed;
showMessage(_("FORWARDING STATE TO InferiorShutdownFailed"));
setState(InferiorShutdownFailed, true);
d->queueShutdownEngine();
break;
default:
d->queueShutdownEngine();
break;
}
d->queueShutdownEngine();
}
void DebuggerEngine::notifyEngineSpontaneousShutdown()
......
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