forked from qt-creator/qt-creator
fix parsing of gdb version
This commit is contained in:
@@ -1362,7 +1362,7 @@ void GdbEngine::handleShowVersion(const GdbResultRecord &response)
|
|||||||
if (response.resultClass == GdbResultDone) {
|
if (response.resultClass == GdbResultDone) {
|
||||||
m_gdbVersion = 100;
|
m_gdbVersion = 100;
|
||||||
QString msg = response.data.findChild("consolestreamoutput").data();
|
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) {
|
if (supported.indexIn(msg) == -1) {
|
||||||
qDebug() << "UNSUPPORTED GDB VERSION " << msg;
|
qDebug() << "UNSUPPORTED GDB VERSION " << msg;
|
||||||
QStringList list = msg.split("\n");
|
QStringList list = msg.split("\n");
|
||||||
@@ -1384,7 +1384,7 @@ void GdbEngine::handleShowVersion(const GdbResultRecord &response)
|
|||||||
} else {
|
} else {
|
||||||
m_gdbVersion = 10000 * supported.cap(2).toInt()
|
m_gdbVersion = 10000 * supported.cap(2).toInt()
|
||||||
+ 100 * supported.cap(3).toInt()
|
+ 100 * supported.cap(3).toInt()
|
||||||
+ 1 * supported.cap(4).toInt();
|
+ 1 * supported.cap(5).toInt();
|
||||||
//qDebug() << "GDB VERSION " << m_gdbVersion;
|
//qDebug() << "GDB VERSION " << m_gdbVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -74,8 +74,6 @@ uint qHash(const double & f)
|
|||||||
return int(f);
|
return int(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define X myns
|
|
||||||
X::QString str;
|
|
||||||
|
|
||||||
class Foo
|
class Foo
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user