Description of problem: found this when building LibreOffice on Fedora 34 with --enable-dbgutil; it will use these debug-related flags: -ggdb2 -gsplit-dwarf -ggnu-pubnames apparently GCC 11 will use -gdwarf-5 by default but GDB doesn't support it. Version-Release number of selected component (if applicable): gcc-11.1.1-1.fc34.x86_64 gdb-10.1-14.fc34.x86_64 How reproducible: always Steps to Reproduce: 1. trivial test2.c file with main function 2. see below Actual results: > g++ -ggdb2 -gsplit-dwarf -ggnu-pubnames test2.c > gdb a.out GNU gdb (GDB) Fedora 10.1-14.fc34 ... Reading symbols from a.out... Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)) [in module /tmp/a-test2.dwo] (No debugging symbols found in a.out) (gdb) b main Breakpoint 1 at 0x40110a (gdb) r Starting program: /tmp/a.out Missing separate debuginfos, use: dnf debuginfo-install glibc-2.33-5.fc34.x86_64 Breakpoint 1, 0x000000000040110a in main () Missing separate debuginfos, use: dnf debuginfo-install libgcc-11.1.1-1.fc34.x86_64 libstdc++-11.1.1-1.fc34.x86_64 (gdb) list No symbol table is loaded. Use the "file" command. (gdb) s Single stepping until exit from function main, which has no line number information. 0x00007ffff7a7bb75 in __libc_start_main () from /lib64/libc.so.6 Expected results: > g++ -ggdb2 -gsplit-dwarf -ggnu-pubnames -gdwarf-4 test2.c > gdb a.out GNU gdb (GDB) Fedora 10.1-14.fc34 ... Reading symbols from a.out... (gdb) b main Breakpoint 1 at 0x40110a: file test2.c, line 4. (gdb) r Starting program: /tmp/a.out Missing separate debuginfos, use: dnf debuginfo-install glibc-2.33-5.fc34.x86_64 Breakpoint 1, main () at test2.c:4 4 int x = 1; Missing separate debuginfos, use: dnf debuginfo-install libgcc-11.1.1-1.fc34.x86_64 libstdc++-11.1.1-1.fc34.x86_64 (gdb) list 1 2 int main() 3 { 4 int x = 1; 5 ++x; 6 ++x; 7 ++x; 8 } (gdb) Additional info: this bug could be related: https://sourceware.org/bugzilla/show_bug.cgi?id=27354
This problem has been fixed in the new GDB release.