debugger: somewhat more graceful shutdown in known situations

This commit is contained in:
hjk
2010-07-20 15:12:29 +02:00
parent f8555f4294
commit 04ad5619b6

View File

@@ -1409,7 +1409,15 @@ void DebuggerEngine::setActive(bool on)
void DebuggerEngine::quitDebugger()
{
showMessage("QUIT DEBUGGER REQUESTED");
shutdownInferior();
d->m_targetState = DebuggerFinished;
if (state() == InferiorStopOk) {
d->doShutdownInferior();
} else if (state() == InferiorRunOk) {
d->doInterruptInferior();
} else {
// FIXME: We should disable the actions connected to that
notifyInferiorIll();
}
}
void DebuggerEngine::requestInterruptInferior()