Allow `DW_AT_decl_file` = 0 for DWARF 5
philipc opened this issue · comments
Philip Craig commented
Even though the DWARF 5 standard says "The value 0 indicates that no source file has been specified.", discussion on the DWARF mailing list indicates that this was an oversight. Additionally, LLVM does emit DW_AT_decl_file
= 0 (and #606 changes dwarfdump to handle this). This change would mean we also don't need to duplicate the compilation file in the line table.
See 1f7de25 for the original implementation of the file index 0 handling.
Philip Craig commented
We should also handle this better when reading, so that things like gimli-rs/addr2line#264 aren't needed.