Demangling compiled C++ names

When XL C/C++ compiles a C++ program, it encodes (mangles) all function names and certain other identifiers to include type and scoping information. The name mangling is necessary to accommodate overloading of C++ functions and operators. The linker uses these mangled names to resolve duplicate symbols and ensure type-safe linkage. These mangled names appear in the object files and final executable file.

Tools that can manipulate the files, the AIX® dump utility for example, have only the mangled names and not the original source-code names, and present the mangled name in their output. This output might be undesirable because the names are no longer recognizable.

Two utilities convert the mangled names to their original source code names:

c++filt
A filter that demangles (decodes) mangled names.
demangle.h
A class library that you can use to develop tools to manipulate mangled names.