rust-lang / rustc-dev-guide

A guide to how rustc works and how to contribute to it.
https://rustc-dev-guide.rust-lang.org
Apache License 2.0
1.66k stars 515 forks source link

Link to demangler source in section on using a debugger #1157

Open rylev opened 3 years ago

rylev commented 3 years ago

The location of the demangler was never linked to in the guide on using a debugger in the compiler.

Originally noted here.

ehuss commented 2 years ago

The sources are at:

if that's what you are asking for. This is for v0 mangling, which is currently (https://github.com/rust-lang/rust/issues/60705) still not the default (except for rustc itself).

eddyb commented 2 years ago

It might be a bit early (well, it's functional but lacks a bunch of newer features), but just in case I lose track of this issue, I did end up making a repo for my C port of rustc-demangle (v0-only for now, and mostly the 2019 code that I had eventually integrated into libiberty which binutils/gdb/perf use - see the README for more details though, hopefully I'll eventually get it to feature parity with rustc-demangle).

While I had originally assumed everyone could use libiberty or copy the demangler code from it, that was very naive of me because of licensing issues, so https://github.com/rui314/mold/issues/371#issuecomment-1131193762 prompted me to release this separately (see the History section in the README for how exactly that was done to avoid copyright complications).

Feel free to PM me on Zulip with more questions or whenever any of this becomes relevant.