Support -Zembed-source in debuginfo#1593
Conversation
fe678d2 to
7724eb4
Compare
|
Thanks for working on this! |
7724eb4 to
bda71e2
Compare
|
Unrelated to this PR, but while trying to test this PR I noticed that with DWARFv5 anonymous sources get invalid file names. They are supposed to be called |
The fix might be FileName::prefer_remapped_unconditionally - internal files and all that. How do you check the output? With what |
|
I used
|
- honour the session DWARF version, enabling v5 when embed-source is requested and plumb the flag through the debug context - attach embedded source bytes to line table FileInfo records alongside existing MD5 hashes - stop excluding rustc’s embed-source-dwarf run-make test so CG_CLIF exercises the feature
bda71e2 to
0e9595e
Compare
|
both GDB and LLDB seem to not have DWARFv5 embedded source support :/ When using (after the latest change) I get: which looks okay! |
I really hate this solution, though, and I think it should be reverted - I can't seem to find a better approach here. |
|
This is what cg_llvm does for determining the file name: https://github.com/rust-lang/rust/blob/caccb4d0368bd918ef6668af8e13834d07040417/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs#L552-L648 It should be lifted into cg_ssa at some point, but for now what you have LGTM. Thanks! |
Fixes #1528