binutils: c++filt

1 
1 9 c++filt
1 *********
1 
1      c++filt [-_|--strip-underscore]
1              [-n|--no-strip-underscore]
1              [-p|--no-params]
1              [-t|--types]
1              [-i|--no-verbose]
1              [-s FORMAT|--format=FORMAT]
1              [--help]  [--version]  [SYMBOL...]
1 
1    The C++ and Java languages provide function overloading, which means
1 that you can write many functions with the same name, providing that
1 each function takes parameters of different types.  In order to be able
1 to distinguish these similarly named functions C++ and Java encode them
1 into a low-level assembler name which uniquely identifies each different
1 version.  This process is known as "mangling".  The 'c++filt' (1)
1 program does the inverse mapping: it decodes ("demangles") low-level
1 names into user-level names so that they can be read.
1 
1    Every alphanumeric word (consisting of letters, digits, underscores,
1 dollars, or periods) seen in the input is a potential mangled name.  If
1 the name decodes into a C++ name, the C++ name replaces the low-level
1 name in the output, otherwise the original word is output.  In this way
1 you can pass an entire assembler source file, containing mangled names,
1 through 'c++filt' and see the same source file containing demangled
1 names.
1 
1    You can also use 'c++filt' to decipher individual symbols by passing
1 them on the command line:
1 
1      c++filt SYMBOL
1 
1    If no SYMBOL arguments are given, 'c++filt' reads symbol names from
1 the standard input instead.  All the results are printed on the standard
1 output.  The difference between reading names from the command line
1 versus reading names from the standard input is that command line
1 arguments are expected to be just mangled names and no checking is
1 performed to separate them from surrounding text.  Thus for example:
1 
1      c++filt -n _Z1fv
1 
1    will work and demangle the name to "f()" whereas:
1 
1      c++filt -n _Z1fv,
1 
1    will not work.  (Note the extra comma at the end of the mangled name
1 which makes it invalid).  This command however will work:
1 
1      echo _Z1fv, | c++filt -n
1 
1    and will display "f(),", i.e., the demangled name followed by a
1 trailing comma.  This behaviour is because when the names are read from
1 the standard input it is expected that they might be part of an
1 assembler source file where there might be extra, extraneous characters
1 trailing after a mangled name.  For example:
1 
1          .type   _Z1fv, @function
1 
1 '-_'
1 '--strip-underscore'
1      On some systems, both the C and C++ compilers put an underscore in
1      front of every name.  For example, the C name 'foo' gets the
1      low-level name '_foo'.  This option removes the initial underscore.
1      Whether 'c++filt' removes the underscore by default is target
1      dependent.
1 
1 '-n'
1 '--no-strip-underscore'
1      Do not remove the initial underscore.
1 
1 '-p'
1 '--no-params'
1      When demangling the name of a function, do not display the types of
1      the function's parameters.
1 
1 '-t'
1 '--types'
1      Attempt to demangle types as well as function names.  This is
1      disabled by default since mangled types are normally only used
1      internally in the compiler, and they can be confused with
1      non-mangled names.  For example, a function called "a" treated as a
1      mangled type name would be demangled to "signed char".
1 
1 '-i'
1 '--no-verbose'
1      Do not include implementation details (if any) in the demangled
1      output.
1 
1 '-s FORMAT'
1 '--format=FORMAT'
1      'c++filt' can decode various methods of mangling, used by different
1      compilers.  The argument to this option selects which method it
1      uses:
1 
1      'auto'
1           Automatic selection based on executable (the default method)
1      'gnu'
1           the one used by the GNU C++ compiler (g++)
1      'lucid'
1           the one used by the Lucid compiler (lcc)
1      'arm'
1           the one specified by the C++ Annotated Reference Manual
1      'hp'
1           the one used by the HP compiler (aCC)
1      'edg'
1           the one used by the EDG compiler
1      'gnu-v3'
1           the one used by the GNU C++ compiler (g++) with the V3 ABI.
1      'java'
1           the one used by the GNU Java compiler (gcj)
1      'gnat'
1           the one used by the GNU Ada compiler (GNAT).
1 
1 '--help'
1      Print a summary of the options to 'c++filt' and exit.
1 
1 '--version'
1      Print the version number of 'c++filt' and exit.
1 
1      _Warning:_ 'c++filt' is a new utility, and the details of its user
1      interface are subject to change in future releases.  In particular,
1      a command-line option may be required in the future to decode a
1      name passed as an argument on the command line; in other words,
1 
1           c++filt SYMBOL
1 
1      may in a future release become
1 
1           c++filt OPTION SYMBOL
1 
1    ---------- Footnotes ----------
1 
1    (1) MS-DOS does not allow '+' characters in file names, so on MS-DOS
1 this program is named 'CXXFILT'.
1