Debugger: Fix endless loop when stopping without winXXinterrupt.exe

Change-Id: Id6f636eaca6ed04cd43a59713487cf8e4c80f1ab
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
David Schulz
2013-08-01 10:51:55 +02:00
parent 8ae41de20c
commit 01123f6adb

View File

@@ -1159,19 +1159,20 @@ void CdbEngine::interruptInferior()
if (debug)
qDebug() << "CdbEngine::interruptInferior()" << stateName(state());
bool ok = false;
if (!canInterruptInferior())
if (!canInterruptInferior()) {
// Restore running state if inferior can't be stoped.
showMessage(tr("Interrupting is not possible in remote sessions."), LogError);
else
ok = doInterruptInferior(NoSpecialStop);
// Restore running state if stop failed.
if (!ok) {
STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyInferiorStopOk")
notifyInferiorStopOk();
STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyInferiorRunRequested")
notifyInferiorRunRequested();
STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyInferiorRunOk")
notifyInferiorRunOk();
return;
}
if (!doInterruptInferior(NoSpecialStop)) {
STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyInferiorStopFailed")
notifyInferiorStopFailed();
}
}