[llvm] [DWARFVerifier] Fix debug_str_offsets DWARF version detection (PR #81210)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 08:31:54 PST 2024


dwblaikie wrote:

The legacy DWARFv4 Split DWARF mode str offsets format can only appear in .dwo files (it was/is never emitted into .o files - many of the Split DWARF features that were generalized to be applicable to .o files (& to non-split DWARF entirely) were not done in the prototype/legacy version, only in the DWARFv5 standard version) 

And a DWP file can't contain mixed 4/5 Split DWARF anyway - so I think we could leave the "use the first CU version" in place, but only do it for .debug_str_offsets.dwo - and always use the header-ful parsing of .debug_str_offsets (nondwo) - it'll be future proof and can mix/match versions because it'll always have the length+version encoding.

Does that make sense/work?

https://github.com/llvm/llvm-project/pull/81210


More information about the llvm-commits mailing list