Bug 428688 - KDevelop does not handle gdb in version 10.x properly
Summary: KDevelop does not handle gdb in version 10.x properly
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: 5.6.0
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 429419 429498 430159 430433 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-11-04 15:08 UTC by Michał Walenciak
Modified: 2023-07-25 17:23 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.12.230800


Attachments
error message indicating that the wrong output line is interpreted as the version number (8.97 KB, image/png)
2023-04-18 12:39 UTC, Julian Wolff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Walenciak 2020-11-04 15:08:36 UTC
SUMMARY
When trying to debug in KDevelop with gdb in version 10.0 an error appears:

You need gdb 7.0.0 or higher.
You are using: GNU gdb (GDB) 10.1 

STEPS TO REPRODUCE:
Install gdb in version 10.1
Load c/cpp project to KDevelop and try to debug it.

SOFTWARE/OS VERSIONS
OS: ArchLinux
Kdevelop version: 5.6.0
gdb version: 10.1
Comment 1 Francis Herne 2020-11-04 15:21:36 UTC
Thank you for the report.

This was noticed already and fixed by Milian Wolff; the fix will be in 5.6.1 which should be released soon.
Comment 2 Francis Herne 2020-11-20 22:34:31 UTC
*** Bug 429419 has been marked as a duplicate of this bug. ***
Comment 3 Sven Brauch 2020-11-22 12:58:00 UTC
*** Bug 429498 has been marked as a duplicate of this bug. ***
Comment 4 Sven Brauch 2020-12-08 16:29:49 UTC
*** Bug 430159 has been marked as a duplicate of this bug. ***
Comment 5 Sven Brauch 2020-12-15 18:23:03 UTC
*** Bug 430433 has been marked as a duplicate of this bug. ***
Comment 6 MadMartian 2021-07-18 21:06:10 UTC
I'm still seeing this in KDevelop 5.6.1
Comment 7 Julian Wolff 2023-04-18 12:38:23 UTC
I can reproduce this with gdb 13.1, KDevelop 5.10.221203

My .gdbinit ends with a few 'skip' lines:

skip -gfi /usr/include/c++/*/*/*
skip -gfi /usr/include/c++/*/*
skip -gfi /usr/include/c++/*

KDevelop seems to to be trying to interpret the output of those lines ("File(s) /usr/include/c++/*/*/* will be skipped when stepping.") as the version number.
Comment 8 Julian Wolff 2023-04-18 12:39:08 UTC
Created attachment 158187 [details]
error message indicating that the wrong output line is interpreted as the version number
Comment 9 Bug Janitor Service 2023-07-22 10:06:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/468
Comment 10 Igor Kushnir 2023-07-25 17:23:38 UTC
Git commit a974c3c66130f9e454de1006a7894e4002541dd0 by Igor Kushnir, on behalf of Denis Biryukov.
Committed on 25/07/2023 at 19:22.
Pushed by igorkushnir into branch 'release/23.08'.

gdb: skip to GDB version string

This change allows to use ~/.gdbinit file with constructions like
`skip -gfi /usr/include/c++/*`.
Problem with current implementation is that when .gdbinit contains such
strings GDB output produced is following:
```
File(s) /usr/include/c++/* will be skipped when stepping.
GNU gdb (Ubuntu 8.2.91.20190405-0ubuntu3) 8.2.91.20190405-git
```
And current implementation expects version on the first output from GDB.

This change fixes it by adding skip functionality during GDB session
initialization.
Related: bug 409702, bug 446786
FIXED-IN: 5.12.230800

M  +29   -15   plugins/gdb/debugsession.cpp

https://invent.kde.org/kdevelop/kdevelop/-/commit/a974c3c66130f9e454de1006a7894e4002541dd0