From 01123f6adb883de661bdf5e291a94eda5bb4ea89 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 1 Aug 2013 10:51:55 +0200 Subject: [PATCH] Debugger: Fix endless loop when stopping without winXXinterrupt.exe Change-Id: Id6f636eaca6ed04cd43a59713487cf8e4c80f1ab Reviewed-by: Friedemann Kleint --- src/plugins/debugger/cdb/cdbengine.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index d66f6085e92..1ca5f428ea7 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -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(); } }