[PATCH] D34765: [DWARF] [NFC] Move a couple of member functions to DWARFUnit (baseclass) from DWARFCompileUnit (derived class)

Wolfgang Pieb via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 12:01:51 PDT 2017


wolfgangp added a comment.

In https://reviews.llvm.org/D34765#795633, @probinson wrote:

> In https://reviews.llvm.org/D34765#795601, @wolfgangp wrote:
>
> > No you're right, my bad. Units in the .dwo sections (both type and CU) don't have a str_offsets_base, which implies that the .debug_str_offsets.dwo section has to consist of a monolithic table of string offsets (without the 8 or 16-byte header that's specified in section 7.26 of the DWARF 5 standard).  Section 7.26 seems to say the opposite, though. It seems I'll have to clarify this with the DWARF5 folks.
>
>
> Worth clarifying on the dwarf-discuss list but I believe the idea is that the .dwo would have a single .debug_str_offsets.dwo contribution (complete with header), corresponding to the .debug_str.dwo contribution, and all units in the compilation would share it just like they would ordinarily share the single .debug_str section in a non-split compilation.


So then given the lack of a str_offsets_base attribute in the unit DIEs the string indices in the .dwo units would have to start with 2 instead of 0 in order to ignore the header. Or else the (absent) attribute would have an implicit value of 8 (or 16 for DWARF64). Seems a bit odd.


https://reviews.llvm.org/D34765





More information about the llvm-commits mailing list