SUMMARY Cannot debug CMake target after Unreal Engine install. STEPS TO REPRODUCE 1. Install Unreal Engine 2. Try to debug any CMake target OBSERVED RESULT gdb error - KDE Develop ``` You need gdb 7.0.0 or higher. You are using: Registered pretty printers for UE4 classes ``` EXPECTED RESULT SOFTWARE/OS VERSIONS Linux/KDE Plasma: 5.2.0-1-MANJARO KDE Plasma Version: 5.16.2 KDE Frameworks Version: 5.59.0 Qt Version: 5.13.0 ADDITIONAL INFORMATION [user@pc ~]$ gdb GNU gdb (GDB) 8.3 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". Registered pretty printers for UE4 classes (gdb)
[user@pc ~]$ cat .gdbinit python import sys sys.path.append('/home/user/.config/Epic/GDBPrinters/') from UE4Printers import register_ue4_printers register_ue4_printers(None) print("Registered pretty printers for UE4 classes") end
I also encountered this when adding: skip -gfi /usr/include/* skip -gfi /usr/include/*/* skip -gfi /usr/include/*/*/* skip -gfi /usr/include/*/*/*/* to .gdbinit. Seems that anything making output in .gdbinit makes this test fail which is annoying.
(In reply to peje66 from comment #2) > I also encountered this when adding: > skip -gfi /usr/include/* > skip -gfi /usr/include/*/* > skip -gfi /usr/include/*/*/* > skip -gfi /usr/include/*/*/*/* > > to .gdbinit. Seems that anything making output in .gdbinit makes this test > fail which is annoying. Running latest master
(In reply to peje66 from comment #3) > (In reply to peje66 from comment #2) > > I also encountered this when adding: > > skip -gfi /usr/include/* > > skip -gfi /usr/include/*/* > > skip -gfi /usr/include/*/*/* > > skip -gfi /usr/include/*/*/*/* > > > > to .gdbinit. Seems that anything making output in .gdbinit makes this test > > fail which is annoying. > > Running latest master A workaround is to put: show version as the first line in .gdbinit
A possibly relevant merge request was started @ https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/468
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 428688, bug 446786 FIXED-IN: 5.12.230800 M +29 -15 plugins/gdb/debugsession.cpp https://invent.kde.org/kdevelop/kdevelop/-/commit/a974c3c66130f9e454de1006a7894e4002541dd0