fix parsing of gdb version

This commit is contained in:
hjk
2008-12-17 15:19:22 +01:00
parent 4876957e59
commit fff7acad55
2 changed files with 2 additions and 4 deletions

View File

@@ -1362,7 +1362,7 @@ void GdbEngine::handleShowVersion(const GdbResultRecord &response)
if (response.resultClass == GdbResultDone) {
m_gdbVersion = 100;
QString msg = response.data.findChild("consolestreamoutput").data();
QRegExp supported("GNU gdb(.*) (\\d+)\\.(\\d+)\\.(\\d+)");
QRegExp supported("GNU gdb(.*) (\\d+)\\.(\\d+)(\\.(\\d+))?");
if (supported.indexIn(msg) == -1) {
qDebug() << "UNSUPPORTED GDB VERSION " << msg;
QStringList list = msg.split("\n");
@@ -1384,7 +1384,7 @@ void GdbEngine::handleShowVersion(const GdbResultRecord &response)
} else {
m_gdbVersion = 10000 * supported.cap(2).toInt()
+ 100 * supported.cap(3).toInt()
+ 1 * supported.cap(4).toInt();
+ 1 * supported.cap(5).toInt();
//qDebug() << "GDB VERSION " << m_gdbVersion;
}
}