forked from qt-creator/qt-creator
Debugger: Parse openSUSE's gdb version strings
Change-Id: I49cfb29a3d6ec2245ed05956bb2cd46c6a2338cc Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -423,12 +423,16 @@ QByteArray DebuggerResponse::toString() const
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Tested in tests/auto/debugger/tst_gdb.cpp
|
||||
|
||||
void extractGdbVersion(const QString &msg,
|
||||
int *gdbVersion, int *gdbBuildVersion, bool *isMacGdb, bool *isQnxGdb)
|
||||
{
|
||||
const QChar dot(QLatin1Char('.'));
|
||||
|
||||
const bool ignoreParenthesisContent = msg.contains(QLatin1String("rubenvb"));
|
||||
const bool ignoreParenthesisContent = msg.contains(QLatin1String("rubenvb"))
|
||||
|| msg.contains(QLatin1String("openSUSE"));
|
||||
|
||||
const QChar parOpen(QLatin1Char('('));
|
||||
const QChar parClose(QLatin1Char(')'));
|
||||
|
||||
|
@@ -61,9 +61,7 @@ void tst_gdb::version()
|
||||
bool qnx = true;
|
||||
Debugger::Internal::extractGdbVersion(msg, &v, &bv, &mac, &qnx);
|
||||
//qDebug() << msg << " -> " << v << bv << mac << qnx;
|
||||
QEXPECT_FAIL("openSUSE 13.1", "Not done yet", Continue);
|
||||
QCOMPARE(v, gdbVersion);
|
||||
QEXPECT_FAIL("openSUSE 13.1", "Not done yet", Continue);
|
||||
QCOMPARE(bv, gdbBuildVersion);
|
||||
QCOMPARE(mac, isMacGdb);
|
||||
QCOMPARE(qnx, isQnxGdb);
|
||||
@@ -124,6 +122,10 @@ void tst_gdb::version_data()
|
||||
QTest::newRow("openSUSE 13.1")
|
||||
<< "GNU gdb (GDB; openSUSE 13.1) 7.6.50.20130731-cvs"
|
||||
<< 70650 << 20130731 << false << false;
|
||||
|
||||
QTest::newRow("openSUSE 13.2")
|
||||
<< "GNU gdb (GDB; openSUSE 13.2) 7.8"
|
||||
<< 70800 << 0 << false << false;
|
||||
}
|
||||
|
||||
static QString chopConst(QString type)
|
||||
|
Reference in New Issue
Block a user