[][src]Crate cplus_demangle

cplus_demangle

Crates.io This library converts C++ mangled symbol names to human-readable strings. It is a safe Rust wrapper to GNU libiberty's C function cplus_demangle.

Example

Suppose you compile the following C++ program:

namespace test {
  void myfn(int x) { }
}

In the resulting binary, the symbol that gets generated for myfn is _ZN4test4myfnEi. We can convert it back with this Rust code:

assert_eq!(cplus_demangle::demangle("_ZN4test4myfnEi").unwrap(), "test::myfn(int)");

Structs

Error
Options

Description of options from demangle.h:

Functions

demangle

Demangle the given name, with default options.

demangle_with_options

Demangle the given name with the specified options.