Skip to content

Decompollaborate/gnuv2_demangle

Repository files navigation

gnuv2_demangle

Latest Version Api Rustdoc

A GNU V2 C++ symbol demangler.

Play with the live version at https://decompollaborate.github.io/gnuv2_demangle!

Important note

This crate demangles symbols for the outdated and no-longer-used V2 ABI mangling scheme of GNU g++. It is very unlikely this is actually the thing you are looking for, since this stuff is ancient.

Only use this crate if you are sure you want to use the g++ mangling scheme used in gcc 2.9 and older.

It is more likely you are looking for crates like cpp_demangle, symbolic-demangle or cplus_demangle.

What's in here?

This repository is the home of two Rust crates:

  • gnuv2_demangle: The demangler library crate for GNU V2 C++ mangled symbols.
  • g2dem: A c++filt clone that uses gnuv2_demangle to demangle symbols.
  • g2dem-web: A static website for demanlging GNU V2 C++ mangled symbols completely in your browser. It gets compiled to WASM, so no webserver is needed. Check out its README.

Please refer to their respective READMEs for more information about each one.

Implementation notes

I implemented this crate by throwing a lot of symbols at an old version of c++filt (2.9 ish), looking the output and trying to make sense of the demangling process.

Because of this, you can expect some inconsistencies, mismangled symbols and other issues while using this crate. If you find any problem feel free to reach out via Github issues or a PR.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Versioning and changelog

This library follows Semantic Versioning. We try to always keep backwards compatibility, so no breaking changes should happen until a major release (i.e. jumping from 1.X.X to 2.0.0).

To see what changed on each release visit either the CHANGELOG.md file or check the releases page on Github. You can also use this link to check the latest release.