Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRust symbol demangling #110
Comments
This comment has been minimized.
This comment has been minimized.
|
Shifting the discussion to this issue..
That would be indeed nicer, but I'm not sure if it is easily achievable, because Rust and C++ manglings are so similar. I'm not expert on this, so do not take my word on this, but testing shortsymbols/fullsymbols on a Rust executable results partial demangling:
|
zokier commentedApr 2, 2018
This came up in HN discussion that Bloaty does not have currently demangling for Rust symbols, and such feature would be useful.
There are at least two different libraries that implement Rust demangling:
GNU libiberty: https://github.com/gcc-mirror/gcc/blob/master/libiberty/rust-demangle.c
rustc-demangle: https://github.com/alexcrichton/rustc-demangle
The latter has the downside of being implemented in Rust, so a small wrapper is needed to make it work with C++ code. Might need bit of work to make it play with CMake nicely.
I have made a quick proof of concept version based on rustc-demangle here: https://github.com/zokier/bloaty/tree/rust_demangle