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

Initial-patch-by: hjk
Task-number: QTCREATORBUG-2084
This commit is contained in:
Friedemann Kleint
2010-08-18 16:39:53 +02:00
parent 5427f7bf8b
commit 4b1540e5a7
2 changed files with 3 additions and 2 deletions

View File

@@ -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;

View File

@@ -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());