Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ demangle(1L) — Lucid C++ 3.0β

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mapNames(1L)

DEMANGLE(1L)

NAME

demangle − demangling "mangled" C++ identifiers

SYNOPSIS

demangle [ -v ]  [ -cerr ] [ optional-list-of-mangled-name ]

DESCRIPTION

demangle invokes a tool that prints "clear" form of identifiers that are "mangled" by lcc, the Lucid C++/C compiler, for type-safe linkage.  If given the mangled form of a function name, the full (prototyped) declaration of the  function is printed. 
 
Demangle translates the names listed as parameters on its invokation line and prints the clear forms, one per line, on the standard output (stdout).
 
If invoked with no parameters, standard input (stdin) is read for a list of such names and the result is again directed to the standard output.
 
When the -v option is present, the original (mangled) name also appears following the clear form, and on the same line.  The -cerr option will cause output to be directed to stderr (instead of stdout) but the format remains unchanged.  This is mainly for compatibility with some filters that produce their output on stderr.
 
As an example, if you get linker (ld) errors naming "___ct__13Iostream_initFv" and "___dt__13Iostream_initFv" as unresolved references, you can use:
 
    % demangle -v ___ct__13Iostream_initFv ___dt__13Iostream_initFv
 
which will produce the following output:
 
    Iostream_init::Iostream_init()      [___ct__13Iostream_initFv]
    Iostream_init::~Iostream_init()     [___dt__13Iostream_initFv]
 
The filter can be used to process the output from any other tools such as nm(1), prof(1) and gprof(1), that display symbol names from object or executable files.
 
Note that when invoked in a C++ mode, lcc, the Lucid C/C++ compiler, automatically uses this filter to display unmangled forms of any symbol names that appear in the linker’s output.
 
 

SEE ALSO

 
Lucid C++ User’s Guide, Lucid, Inc., June 1993. 
 
mapNames(1L)
 
Margaret Ellis and Bjarne Stroustrup The Annotated C++ Reference Manual, Addison-Wesley, 1990. 
 

BUGS

For incorrectly mangled names (e.g. cfront’s encoding of certain nested types, also emulated in "lcc -Xf ..."), the unmangled forms would not necessarily describe the original types from which the names were derived. 

Lucid C/C++ Rev. 2.2   —  Last change: 8/18/92

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026