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

Reviewed-by: hjk
Task-number: QTCREATORBUG-1020
This commit is contained in:
Friedemann Kleint
2010-04-09 12:49:21 +02:00
parent 53158b4617
commit 90a69474d9

View File

@@ -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);