Commit 4c358cc3 authored by hjk's avatar hjk

Do not depend on gdb's async stream output having tokens.

This is in anticipation of a change in the next gdb release
which will drop the token.
parent d1e84135
...@@ -444,7 +444,7 @@ void GdbEngine::handleResponse() ...@@ -444,7 +444,7 @@ void GdbEngine::handleResponse()
break; break;
} }
if (token == -1 && *from != '&' && *from != '~') { if (token == -1 && *from != '&' && *from != '~' && *from != '*') {
// FIXME: On Linux the application's std::out is merged in here. // FIXME: On Linux the application's std::out is merged in here.
// High risk of falsely interpreting this as MI output. // High risk of falsely interpreting this as MI output.
// We assume that we _always_ use tokens, so not finding a token // We assume that we _always_ use tokens, so not finding a token
...@@ -493,8 +493,10 @@ void GdbEngine::handleResponse() ...@@ -493,8 +493,10 @@ void GdbEngine::handleResponse()
m_inbuffer = QByteArray(from, to - from); m_inbuffer = QByteArray(from, to - from);
if (asyncClass == "stopped") { if (asyncClass == "stopped") {
handleAsyncOutput(record); handleAsyncOutput(record);
} else if (asyncClass == "running") {
// Archer has 'thread-id="all"' here
} else { } else {
qDebug() << "INGNORED ASYNC OUTPUT " << record.toString(); qDebug() << "IGNORED ASYNC OUTPUT " << record.toString();
} }
break; break;
} }
...@@ -773,11 +775,6 @@ void GdbEngine::handleResultRecord(const GdbResultRecord &record) ...@@ -773,11 +775,6 @@ void GdbEngine::handleResultRecord(const GdbResultRecord &record)
if (token == -1) if (token == -1)
return; return;
if (!m_cookieForToken.contains(token)) {
qDebug() << "NO SUCH TOKEN (ANYMORE): " << token;
return;
}
GdbCookie cmd = m_cookieForToken.take(token); GdbCookie cmd = m_cookieForToken.take(token);
// FIXME: this falsely rejects results from the custom dumper recognition // FIXME: this falsely rejects results from the custom dumper recognition
...@@ -788,12 +785,6 @@ void GdbEngine::handleResultRecord(const GdbResultRecord &record) ...@@ -788,12 +785,6 @@ void GdbEngine::handleResultRecord(const GdbResultRecord &record)
return; return;
} }
// We get _two_ results for a '-exec-foo' command: First a
// 'running' notification, then a 'stopped' or similar.
// So put it back.
if (record.resultClass == GdbResultRunning)
m_cookieForToken[token] = cmd;
#if 0 #if 0
qDebug() << "# handleOutput, " qDebug() << "# handleOutput, "
<< "cmd type: " << cmd.type << "cmd type: " << cmd.type
......
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