3.4 Demangler API, for types

Dennis Handly dhandly at cup.hp.com
Fri Dec 5 08:14:37 UTC 2003


Does the following mean we need to demangle types from type_info?

3.4 Demangler API   (__cxa_demangle)

o mangled-name is a pointer to a null-terminated array of characters.
It may be either an external name, i.e.  with a "_Z" prefix, or an
internal NTBS mangling, e.g.  of a type for type_info.

So "i" would be "int".

So this would be the BNF starting with: 5.1.5 Type encodings  ??

It seems that g++'s c++filt has logic to handle "i" as a parm and "i" in
a source file:

$ /usr/local/bin/c++filt < stuff
i i i i
l l ll
j
$ /usr/local/bin/c++filt i
int

Is the logic as simple as looking for leading _Z for the file case?



More information about the cxx-abi-dev mailing list