Skip to content

Add file hash to .debug_line #936

@bjorn3

Description

@bjorn3

The file hash can be used by a debugger to detect when the source file has changed after compilation.

This can be implemented by passing a FileInfo the right MD5 hash to LineProgram::new and line_program.add_file (here and here) and setting line_program.file_has_md5 to true. Also the DWARF version on platforms other than macOS needs to be changed to 5.

Blocked on rust-lang/rust#69718, which implements this for cg_llvm and adds a new src_hash field to SourceFile storing the MD5 hash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information at runtime in generated code.C-enhancementCategory: An issue proposing an enhancement or a PR with one.good first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions