-gsplit-dwarf itself works fine. But -gsplit-dwarf=single (and even -gsplit-dwarf=split which is the same as -gsplit-dwarf) will produce unloadable debug info.
icecream-1.3-4.fc34.x86_64
Actual:
Reading symbols from ./main...
warning: Could not find DWO CU icecc-201616_c274b459.o(0xadb46cb729222933) referenced by CU at offset 0xd8 [in module /quad/home/jkratoch/t/splitsingle/main]
warning: Could not find DWO CU icecc-201617_cfd7b459.o(0x52d23d48271d0185) referenced by CU at offset 0x144 [in module /quad/home/jkratoch/t/splitsingle/main]
$ llvm-dwarfdump 110.o
.debug_info contents:
...
0x0000000b: DW_TAG_compile_unit
...
DW_AT_GNU_dwo_name ("icecc-201615_c4e1b459.o")
...
.debug_info.dwo contents:
...
0x0000000b: DW_TAG_compile_unit
DW_AT_name ("110.C")
DW_AT_GNU_dwo_name ("icecc-201615_c4e1b459.o")
...
0x00000019: DW_TAG_variable
DW_AT_name ("i110")
-gsplit-dwarf
itself works fine. But-gsplit-dwarf=single
(and even-gsplit-dwarf=split
which is the same as-gsplit-dwarf
) will produce unloadable debug info.icecream-1.3-4.fc34.x86_64
Actual:
Expected:
run.txt