Commit 4b1540e5 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger/Windows[gdb]: Fix Attach to running (gui) process.

Initial-patch-by: hjk
Task-number: QTCREATORBUG-2084
parent 5427f7bf
......@@ -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;
......
......@@ -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());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment