On openSUSE Tumbleweed, with gcc 12.1.0, which supports -gctf, I run into: ... FAIL: gdb.base/ctf-constvars.exp: print vox ... AFAICT this is due to: ... /* Read the CTF section only if there is no DWARF info. */ if (!has_dwarf2 && ei.ctfsect) { elfctf_build_psymtabs (objfile); } ... and the the exec has both ctf and dwarf: ... $ readelf -S -W outputs/gdb.base/ctf-constvars/ctf-constvars ... [27] .ctf PROGBITS 0000000000000000 0052cc 00054f 00 0 0 1 [28] .debug_aranges PROGBITS 0000000000000000 003160 000120 00 0 0 16 [29] .debug_info PROGBITS 0000000000000000 003280 000988 00 0 0 1 [30] .debug_abbrev PROGBITS 0000000000000000 003c08 000282 00 0 0 1 [31] .debug_line PROGBITS 0000000000000000 003e8a 00024f 00 0 0 1 [32] .debug_str PROGBITS 0000000000000000 0040d9 0004bc 01 MS 0 0 1 [33] .debug_line_str PROGBITS 0000000000000000 004595 000144 01 MS 0 0 1 [34] .debug_rnglists PROGBITS 0000000000000000 0046d9 000042 00 0 0 1 ... This due to the linked in startup files having dwarf info: ... $ readelf --dwarf-depth=1 -wi outputs/gdb.base/ctf-constvars/ctf-constvars | grep name <1a> DW_AT_name : ../sysdeps/x86_64/start.S <3a> DW_AT_name : ../sysdeps/x86/abi-note.c <510> DW_AT_name : init.c <551> DW_AT_name : static-reloc.c <957> DW_AT_name : ../sysdeps/x86_64/crti.S <97a> DW_AT_name : ../sysdeps/x86_64/crtn.S ...
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=908a926ec4ecd48571aafb560d97b927b6f94b5e