codelldb: Rust now emits with a new PDB language identifier, breaking debugging on Windows

Rust now has a dedicated language identifier in the PDB format, instead of emitting as Masm. https://reviews.llvm.org/D115300

This broke CodeLLDB’s ability to debug binaries produced by the latest Rust compiler on Windows: https://github.com/rust-lang/rust/issues/93624

I see that CodeLLDB is using a patched LLVM that detects Masm as potentially Rust code via this https://github.com/vadimcn/llvm-project/commit/4aba5a4d27585ae8d4c3c94dc33da3aa055bc664 commit. Can we update the patch to also detect Rust (0x15) as Rust code ?

Let me know if I can help.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (4 by maintainers)

Most upvoted comments

Okay, I’ve a new build. Please test it!

Thanks for letting me know!
I’m planning to get a new version out in the next few weeks. Since this is currently broken only on nightly, ISTM there’s no particular urgency to this issue.

This change ended up hitting Rust 1.59.0 (the current stable release), rather than 1.60.0 as intended.

@vadimcn is there anything we can do to help expedite a fix?

For those that are interested, here’s what happened on the Rust side that caused it to hit stable one version early:

@genusistimelord my development work is also affected by this, as I use nightly compiler by default. I reverted to nightly-2022-01-27 as that is the last nightly without the LLVM patches.

I also tried to build an LLVM with all the relevant patches baked in, but could not find any clear instruction on how to go forward with it and abandoned it as a lost cause.

If @vadimcn could kindly publish the instructions for updating CodeLLDB’s fork of LLVM, other contributors would be able to fiddle with it, maybe?