summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-08-18 16:39:53 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-08-18 16:43:21 +0200
commit4b1540e5a730e2e4f0e9c9c8203045fd1f59dca5 (patch)
tree9ac775287cf91551e3183b7d21c4bc7bca64d7b6
parent5427f7bf8b24b96bedb2919491716a9289f0bfe5 (diff)
downloadqt-creator-4b1540e5a730e2e4f0e9c9c8203045fd1f59dca5.tar.gz
Debugger/Windows[gdb]: Fix Attach to running (gui) process.
Initial-patch-by: hjk Task-number: QTCREATORBUG-2084
-rw-r--r--src/plugins/debugger/debuggermanager.cpp3
-rw-r--r--src/plugins/debugger/gdb/attachgdbadapter.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp
index 6bfa9b973e..f7ccd6ad4b 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 6ef72a1b29..821afb391f 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());