Skip to content

Consider emitting LLVM DIFile checksums. #68980

Closed

Description

@eddyb

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

Activity

  1. added
    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)
    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Feb 9, 2020
  2. bjorn3 commented on Feb 10, 2020

    @bjorn3
    Member

    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.

  3. added a commit that references this issue on Apr 4, 2020
    6050e52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions