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

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


dwblaikie wrote:

> Note: the modified test never worked to being with. It was emitting the error message by accident, because it treated the "legacy" dwarf 4 section as a dwarf 5 section. To see why, simply note that the test contained no debug_info.dwo sections, so the call to DWARFObject::forEachInfoDWOSections was doing nothing.

Not sure I'm following this - the test looks like it did work to test the functionality as it was before this patch (where str_offsets and str_offsets.dwo were treated the same - incorrectly for str_offsets non-dwo, as we've discussed - but for what was implemented, it was tested (it didn't need to test the dwo case specifically, because the implemented behavior wasn't unique to str_offsets.dwo - it was generic to any str offsets))

I'm not sure I understand why the test is changed to use the raw byte encoding for the section, rather than the yaml encoding which is a bit more readable? Is it because the yaml encoding doesn't support dwo sections?

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


More information about the llvm-commits mailing list