Commit 56053abb authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

in fact, older gdbs don't send *stopped after attaching

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