Bug 429054

Summary: KDevelop wrongly considers GDB 10 as earlier than GDB 7.0.0
Product: [Applications] kdevelop Reporter: jerome.gardou
Component: CPP DebuggerAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: kde, niko.sams, q.kde
Priority: NOR    
Version First Reported In: 5.6.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.6.1
Sentry Crash Report:

Description jerome.gardou 2020-11-13 11:03:58 UTC
SUMMARY
As seen in Fedora Core 33, where GDB is version 10.1

STEPS TO REPRODUCE
1. Install KDevelop 5.6.0
2. Install GDB 10.1
3. Try to debug a program using KDevelop interface.

OBSERVED RESULT
A pop-up asking for GDB 7.0.0 or greater will appear


EXPECTED RESULT
Kdevelop must launch GDB and start debugging the program

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Core 33 ?
(available in About System)
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION
Comment 1 steveren 2020-11-13 17:00:59 UTC
This is how somebody thought it would be a good idea to test for version >= 7 in the file kdevelop-5.6.0/plugins/gdb/debugsession.cpp

    QRegExp rx(QStringLiteral("([7-9]+)\\.([0-9]+)(\\.([0-9]+))?"));
    int idx = rx.indexIn(s.first());
    if (idx == -1)
       ...

Oh dear.