Prior to DWARF v5, a directory index of 0 represents DW_AT_comp_dir.
In DWARF v5, the index starts with 0 and Entry.DirIdx is the index into
Prologue.IncludeDirectories.
Differential D61253
DWARF v5: fix directory index in the line table MaskRay on Apr 29 2019, 1:31 AM. Authored by
Details
Prior to DWARF v5, a directory index of 0 represents DW_AT_comp_dir. In DWARF v5, the index starts with 0 and Entry.DirIdx is the index into
Diff Detail
Event TimelineComment Actions I believe the changes here are correct. What I find unfortunate is that it is not able to test this without including a debug_info info section in the object file. Which is a bit ironic given that the purpose of these changes in DWARF5 was to have a fully-standalone .debug_line section. Comment Actions The .debug_info is used by llvm-symbolizer to locate the compile unit. Without it llvm-symbolizer doesn't bother reading .debug_line... Comment Actions Right - Pavel's point is that DWARFv5 line tables can/should be readable without debug_info, so it's unfortunate that llvm-symbolizer still reads debug_info when parsing a DWARFv5 line table, when it shouldn't have to. |