Skip to content

DWARF information does not contain absolute file locations for generics #54408

Closed
@yurydelendik

Description

@yurydelendik

STR (on Linux):

  1. Create hey.rs file that has generics usage (wget https://raw.githubusercontent.com/yurydelendik/old-man-sandbox/master/rust-wasm-hey/hey.rs)
  2. Compile code rustc +nightly hey.rs --crate-type=cdylib -g -o hey
  3. Dump DWARF info llvm-dwarfdump hey -debug-info -debug-line > hey.txt

Notice that hey.txt contains such entries as DW_AT_decl_file ("/home/yury/liballoc/vec.rs"), possibly produced by the fact that "liballoc/vec.rs" is a relative path and DW_AT_comp_dir is set to "/home/yury".

It is expected for core files to have absolute path e.g. "/rustc/20dc0c50704ba1fc8c56a88ae2bf05ddb3e419bc/src/liballoc/raw_vec.rs"

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions