Commit 90a69474 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger[gdb/MinGW]: Ignore spurious 'running' warnings when attaching.

Reviewed-by: hjk
Task-number: QTCREATORBUG-1020
parent 53158b46
......@@ -961,10 +961,19 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
response->resultClass != ((cmd.flags & RunRequest) ? GdbResultRunning :
(cmd.flags & ExitRequest) ? GdbResultExit :
GdbResultDone)) {
QByteArray rsp = GdbResponse::stringFromResultClass(response->resultClass);
rsp = "UNEXPECTED RESPONSE " + rsp + " TO COMMAND" + cmd.command;
qWarning() << rsp << " AT " __FILE__ ":" STRINGIFY(__LINE__);
debugMessage(_(rsp));
#ifdef Q_OS_WIN
// Ignore spurious 'running' responses to 'attach'
const bool warning = !(m_startParameters->startMode == AttachExternal
&& cmd.command.startsWith("attach"));
#else
const bool warning = true;
#endif
if (warning) {
QByteArray rsp = GdbResponse::stringFromResultClass(response->resultClass);
rsp = "UNEXPECTED RESPONSE '" + rsp + "' TO COMMAND '" + cmd.command + "'";
qWarning() << rsp << " AT " __FILE__ ":" STRINGIFY(__LINE__);
debugMessage(_(rsp));
}
} else {
if (cmd.callback)
(this->*cmd.callback)(*response);
......
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