rust-lang / rust-lang/rustc_codegen_cranelift
CodeView debug info support for Windows
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 157
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 3
Description
It looks like cg_clif doesn't support debug info on Windows. It would be nice if we could do that!
Some pdb files are generated but I'm not sure what's in them (see: https://github.com/bjorn3/rustc_codegen_cranelift/issues/1249#issuecomment-1262034841).
I've been looking into this mostly because I have no idea how any of this works. I found two crates that seem to produce pdb files (bao-pdb, pdb_wrapper), but I'm not sure how complete they are or if they work for our use case.
A more interesting approach is what LLVM does for generating CodeView. LLVM apparently only emits CodeView line tables, and DWARF debug info (which we already know how to do!) And lets link.exe convert it into a PDB file, this seems like a much easier solution and maybe implementing only that part of CodeView would be easier.
Edit: Re-reading the rust issue, it looks like this doesn't get us variable and type information, only line information.
Edit 2: That information is also out of date, LLVM now has full CodeView support, but its good to know that that's how they started out.
Additional links:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Rust Windows debug-info issue and PR, then read LLVM's CodeView material and Microsoft's PDB documentation. Compare the existing debug-info behavior with the Windows requirements; done means cg_clif emits usable Windows debug information, including the variable and type information discussed in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100