This patch adds support for DWARFv5 type units: parsing from
the .debug_info section, and writing index to the type unit index.
Previously, the type units were part of the .debug_types section
which is no longer used in DWARFv5.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I think maybe combining the new index support with TU support might be complicating this patch a bit more than ideal - maybe pulling the new index support into a separate patch would be good (perhaps the new-in-v5 debug_macro section could be used to demonstrate that the v5 index is being used)
llvm/test/tools/llvm-dwp/X86/tu_units_v5.s | ||
---|---|---|
13–15 | Could you fix the alignment so these fields line up with their headers? | |
56 | Please add the newline at the end here | |
llvm/test/tools/llvm-dwp/X86/type_dedup_v5.s | ||
1 | Might be worth a bit more detail somewhere in here that explains that the DWARF in this test is a bit bogus (two TUs with the same signature in the same input file - and TUs with invalid DIE offsets/no DIEs in the unit) but good enough for dwp. Hmm, maybe it isn't good enough for dumping, though - I'd expect this still to produce some errors about missing DIEs in the dwarfdump? | |
15 | Might be nice to include which unit type this is in the comment - improvements to llvm's verbose asm output to do this automatically would be great. (but you can add it by hand here too/instead) |
Thanks a lot for the review!
I have split up the original CL into three (dependent) CLs now:
- Making llvm-dwp aware of multiple debug info sections (as a preparation to further support DWARFv5 dwos and type units) https://reviews.llvm.org/D102312
- Support reading and writing v5 index https://reviews.llvm.org/D102315
- (this CL) add type unit support
I hope it's easier to review this way. The other CL for rnglists and loclists support (https://reviews.llvm.org/D101894) is dependent on this CL.
llvm/test/tools/llvm-dwp/X86/type_dedup_v5.s | ||
---|---|---|
1 | Yes you were right, that it would not be fine for dumping. I have updated the test to actually use two separate files now, and added more information for dumping to at least not produce errors on not being able to parse the type unit. | |
15 | I have added info on that manually now. |
Could you fix the alignment so these fields line up with their headers?