debugger: cleaner debugger aborting

Make the second "Abort Debugger" kill the gdb process directly
instead of relying on further communication.

Also fix some "unexpected" (but harmless) state transitions.

Change-Id: I0938ec76420fbd77ec4b7348819dd7f63763547f
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-10-31 17:36:08 +01:00
committed by hjk
parent 384a8ed1cf
commit 755f5fc327
6 changed files with 43 additions and 14 deletions

View File

@@ -1209,7 +1209,7 @@ bool DebuggerEngine::isReverseDebugging() const
// Called by DebuggerRunControl.
void DebuggerEngine::quitDebugger()
{
showMessage("QUIT DEBUGGER REQUESTED");
showMessage(_("QUIT DEBUGGER REQUESTED IN STATE %1").arg(state()));
d->m_targetState = DebuggerFinished;
switch (state()) {
case InferiorStopOk:
@@ -1225,6 +1225,9 @@ void DebuggerEngine::quitDebugger()
case EngineRunFailed:
case DebuggerFinished:
break;
case InferiorSetupRequested:
notifyInferiorSetupFailed();
break;
default:
// FIXME: We should disable the actions connected to that.
notifyInferiorIll();
@@ -1232,6 +1235,12 @@ void DebuggerEngine::quitDebugger()
}
}
void DebuggerEngine::abortDebugger()
{
// Overridden in e.g. GdbEngine.
quitDebugger();
}
void DebuggerEngine::requestInterruptInferior()
{
d->doInterruptInferior();