Debugger: Improve exit handling.

This commit is contained in:
Friedemann Kleint
2010-08-18 11:08:50 +02:00
parent 172288b593
commit 83f3119c97
4 changed files with 34 additions and 12 deletions

View File

@@ -1466,13 +1466,18 @@ void DebuggerEngine::quitDebugger()
{
showMessage("QUIT DEBUGGER REQUESTED");
d->m_targetState = DebuggerFinished;
if (state() == InferiorStopOk) {
switch (state()) {
case InferiorStopOk:
case InferiorStopFailed:
d->queueShutdownInferior();
} else if (state() == InferiorRunOk) {
break;
case InferiorRunOk:
d->doInterruptInferior();
} else {
break;
default:
// FIXME: We should disable the actions connected to that
notifyInferiorIll();
break;
}
}