forked from qt-creator/qt-creator
Debugger/Windows[gdb]: Fix Attach to running (gui) process.
Initial-patch-by: hjk Task-number: QTCREATORBUG-2084
This commit is contained in:
@@ -1731,7 +1731,8 @@ static bool isAllowedTransition(int from, int to)
|
|||||||
|
|
||||||
case InferiorStarting:
|
case InferiorStarting:
|
||||||
return to == InferiorRunningRequested || to == InferiorStopped
|
return to == InferiorRunningRequested || to == InferiorStopped
|
||||||
|| to == InferiorStartFailed || to == InferiorUnrunnable;
|
|| to == InferiorStartFailed || to == InferiorUnrunnable
|
||||||
|
|| to == InferiorRunning;
|
||||||
case InferiorStartFailed:
|
case InferiorStartFailed:
|
||||||
return to == EngineShuttingDown;
|
return to == EngineShuttingDown;
|
||||||
|
|
||||||
|
@@ -78,7 +78,7 @@ void AttachGdbAdapter::startInferior()
|
|||||||
void AttachGdbAdapter::handleAttach(const GdbResponse &response)
|
void AttachGdbAdapter::handleAttach(const GdbResponse &response)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
|
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
|
||||||
if (response.resultClass == GdbResultDone) {
|
if (response.resultClass == GdbResultDone || response.resultClass == GdbResultRunning) {
|
||||||
setState(InferiorStopped);
|
setState(InferiorStopped);
|
||||||
debugMessage(_("INFERIOR ATTACHED"));
|
debugMessage(_("INFERIOR ATTACHED"));
|
||||||
showStatusMessage(msgAttachedToStoppedInferior());
|
showStatusMessage(msgAttachedToStoppedInferior());
|
||||||
|
Reference in New Issue
Block a user