Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow DW_AT_decl_file = 0 for DWARF 5 #607

Open
philipc opened this issue Nov 10, 2021 · 1 comment
Open

Allow DW_AT_decl_file = 0 for DWARF 5 #607

philipc opened this issue Nov 10, 2021 · 1 comment

Comments

@philipc
Copy link
Collaborator

philipc commented Nov 10, 2021

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.

@philipc
Copy link
Collaborator Author

philipc commented Feb 10, 2023

We should also handle this better when reading, so that things like gimli-rs/addr2line#264 aren't needed.

@philipc philipc changed the title write: reconsider allowing DW_AT_decl_file = 0 for DWARF 5 Allow DW_AT_decl_file = 0 for DWARF 5 Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant