[Dwarf-Discuss] DWP mixed (DWARFv4/pre-standard + DWARFv5) content

Cary Coutant ccoutant@gmail.com
Sun Mar 29 22:43:53 GMT 2020


>> > Yep - unless someone has significant objections my plan is currently:
>> >
>> > Emit a v5 index with extension/non-standard extra column indexes (specifically: DW_SECT_LOC and 9 and DW_SECT_MACINFO at 10). I hope those can at least be reserved (like DW_SECT value 2 (originally DW_SECT_TYPES) was in DWARFv5) in DWARFv6. & maybe open up an extension space in the future.
>>
>> That sounds good to me. When I saw that number 2 (debug_types in the
>> fission extension) was reserved, I originally assumed this was what
>> had already happened.

The pre-v5 dwp format was just a prototype, accessed via
--experimental GCC flags, and I don't think we ever intended to
support mixing pre-v5 dwo files with standard v5 dwo files. I'd
recommend your original option #1 (invalid/unsupported). Thus, you
shouldn't need DW_SECT_LOC or DW_SECT_MACINFO.

The .debug_types sections were moved back into .debug_info sections at
the very last minute, so we just removed DW_SECT_TYPES without
renumbering the later values. As best I recall, that was just a nod
towards some compatibility with the prototype format, but it wasn't
intended to provide for complete compatibility.

I don't believe we ever supported .debug_macinfo in the prototype, so
I wasn't concerned with the renumbering around DW_SECT_MACRO and
DW_SECT_MACINFO.

I agree that we should have reserved an extension range for DW_SECT
values. It's probably safe to pick some arbitrarily large values if
you need to extend this.

For DWARF-64 support, I truly hoped that we wouldn't ever need it, but
if it was ever necessary, the mechanism I had in mind was to simply
replace .debug_cu_index sections with .debug_cu_index_64 sections (and
likewise for .debug_tu_index). Maybe DWARF v6 will address this. Keep
in mind that the .dwp can be an ELFCLASS64 object file, and its total
size can grow larger than 4GB, even if .debug_cu_index can't support
any section offsets larger than 4GB.

-cary



More information about the Dwarf-discuss mailing list