forked from qt-creator/qt-creator
		
	in fact, older gdbs don't send *stopped after attaching
This commit is contained in:
		| @@ -78,7 +78,16 @@ void AttachGdbAdapter::startInferior() | ||||
| void AttachGdbAdapter::handleAttach(const GdbResponse &response) | ||||
| { | ||||
|     if (response.resultClass == GdbResultDone) { | ||||
|         QTC_ASSERT(state() == InferiorStopped, qDebug() << state()); | ||||
|         // We don't know the exact 6.8.50 build where gdb started emitting | ||||
|         // *stopped here, so allow for some slack. | ||||
|         if (m_engine->m_gdbVersion < 60850) { | ||||
|             QTC_ASSERT(state() == InferiorStarting, qDebug() << state()); | ||||
|             setState(InferiorStopped); | ||||
|         } else if (m_engine->m_gdbVersion < 70000 && state() == InferiorStarting) { | ||||
|             setState(InferiorStopped); | ||||
|         } else { | ||||
|             QTC_ASSERT(state() == InferiorStopped, qDebug() << state()); | ||||
|         } | ||||
|         debugMessage(_("INFERIOR ATTACHED")); | ||||
|         showStatusMessage(msgAttachedToStoppedInferior()); | ||||
|         emit inferiorPrepared(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user