diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp index 710bee9aee5e666a81eb2eee7c150688ef514775..6e650917ce66a61754561cf6ce5aba80dc207457 100644 --- a/src/plugins/debugger/gdbengine.cpp +++ b/src/plugins/debugger/gdbengine.cpp @@ -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; } } diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp index 149be98c271905564acb2a8f2274442a5305e578..ba36298eb1a129b6ad488f8927d717dc93ef1044 100644 --- a/tests/manual/gdbdebugger/simple/app.cpp +++ b/tests/manual/gdbdebugger/simple/app.cpp @@ -74,8 +74,6 @@ uint qHash(const double & f) return int(f); } -#define X myns -X::QString str; class Foo {