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

Consider emitting LLVM DIFile checksums. #68980

Closed
eddyb opened this issue Feb 9, 2020 · 1 comment · Fixed by #69718
Closed

Consider emitting LLVM DIFile checksums. #68980

eddyb opened this issue Feb 9, 2020 · 1 comment · Fixed by #69718
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@eddyb
Copy link
Member

eddyb commented Feb 9, 2020

We already hash the contents of SourceFiles to determine whether the file on disk (if it even exists) still has the same contents, across crates.

I came across LLVM supporting MD5 and SHA1 checksums for DIFiles, and I'm wondering if it could be useful in a similar way - perhaps debuggers would be able to detect changed sources?

cc @michaelwoerister

@jonas-schievink jonas-schievink added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 9, 2020
@bjorn3
Copy link
Member

bjorn3 commented Feb 10, 2020

I'm wondering if it could be useful in a similar way - perhaps debuggers would be able to detect changed sources?

Yes, that is the purpose of the hash, see DWARF5 section 6.2.4.1 opcode DW_LNCT_MD5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants