diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp index 6bfa9b973e078326b54e881a9f266bdb54df3f9f..f7ccd6ad4b22b6f59994aa43078c874c104ebb68 100644 --- a/src/plugins/debugger/debuggermanager.cpp +++ b/src/plugins/debugger/debuggermanager.cpp @@ -1731,7 +1731,8 @@ static bool isAllowedTransition(int from, int to) case InferiorStarting: return to == InferiorRunningRequested || to == InferiorStopped - || to == InferiorStartFailed || to == InferiorUnrunnable; + || to == InferiorStartFailed || to == InferiorUnrunnable + || to == InferiorRunning; case InferiorStartFailed: return to == EngineShuttingDown; diff --git a/src/plugins/debugger/gdb/attachgdbadapter.cpp b/src/plugins/debugger/gdb/attachgdbadapter.cpp index 6ef72a1b2902bc62dec722a7026afca8a0579fff..821afb391f4f3f5c715e1597981a2d221cfab3b7 100644 --- a/src/plugins/debugger/gdb/attachgdbadapter.cpp +++ b/src/plugins/debugger/gdb/attachgdbadapter.cpp @@ -78,7 +78,7 @@ void AttachGdbAdapter::startInferior() void AttachGdbAdapter::handleAttach(const GdbResponse &response) { QTC_ASSERT(state() == InferiorStarting, qDebug() << state()); - if (response.resultClass == GdbResultDone) { + if (response.resultClass == GdbResultDone || response.resultClass == GdbResultRunning) { setState(InferiorStopped); debugMessage(_("INFERIOR ATTACHED")); showStatusMessage(msgAttachedToStoppedInferior());