On Wed, 02 Feb 2022 01:08:27 +0100, David Blaikie via Dwarf-Discuss wrote: > Clang does (if you pass -gpubnames in addition to -gdwarf-5). Looks like it > only uses DW_FORM_ref4 as though they were absolute (not unit-relative) > offsets. Looks like @Pavel Labath <pa...@labath.sk> added this DWARFv5 > .debug_names support in https://reviews.llvm.org/D43286 > > Ah, looks like the implementation only adds IDX_compile_unit if there's > more than one unit being produced: > https://github.com/llvm/llvm-project/blob/d7dd7ad827a0a78314f3c9b55f4778a6059840f3/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp#L410
If not obvious that means one needs to use -gdwarf-5 -gpubnames -flto. Otherwise each CU/TU has its own single-CU/TU .debug_names index. Jan _______________________________________________ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org