Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
C++FILT(1) | GNU Development Tools | C++FILT(1) |
NAME
c++filt - demangle C++ and Java symbolsSYNOPSIS
c++filt [ -_|--strip-underscore][-n|--no-strip-underscore]
[-p|--no-params]
[-t|--types]
[-i|--no-verbose]
[-r|--no-recurse-limit]
[-R|--recurse-limit]
[-s format|--format=format]
[--help] [--version] [symbol...]
DESCRIPTION
The C++ and Java languages provide function overloading, which means that you can write many functions with the same name, providing that each function takes parameters of different types. In order to be able to distinguish these similarly named functions C++ and Java encode them into a low-level assembler name which uniquely identifies each different version. This process is known as mangling. The c++filt [1] program does the inverse mapping: it decodes ( demangles) low-level names into user-level names so that they can be read.c++filt <symbol>
c++filt -n _Z1fv
c++filt -n _Z1fv,
echo _Z1fv, | c++filt -n
.type _Z1fv, @function
OPTIONS
- -_
- --strip-underscore
- On some systems, both the C and C++ compilers put an underscore in front of every name. For example, the C name "foo" gets the low-level name "_foo". This option removes the initial underscore. Whether c++filt removes the underscore by default is target dependent.
- -n
- --no-strip-underscore
- Do not remove the initial underscore.
- -p
- --no-params
- When demangling the name of a function, do not display the types of the function's parameters.
- -t
- --types
- Attempt to demangle types as well as function names. This is disabled by default since mangled types are normally only used internally in the compiler, and they can be confused with non-mangled names. For example, a function called "a" treated as a mangled type name would be demangled to "signed char".
- -i
- --no-verbose
- Do not include implementation details (if any) in the demangled output.
- -r
- -R
- --recurse-limit
- --no-recurse-limit
- --recursion-limit
- --no-recursion-limit
-
Enables or disables a limit on the amount of recursion performed whilst demangling strings. Since the name mangling formats allow for an infinite level of recursion it is possible to create strings whose decoding will exhaust the amount of stack space available on the host machine, triggering a memory fault. The limit tries to prevent this from happening by restricting recursion to 2048 levels of nesting.
- -s format
- --format=format
- c++filt can decode various methods of mangling, used by different compilers. The argument to this option selects which method it uses:
- "auto"
- Automatic selection based on executable (the default method)
- "gnu"
- the one used by the GNU C++ compiler (g++)
- "lucid"
- the one used by the Lucid compiler (lcc)
- "arm"
- the one specified by the C++ Annotated Reference Manual
- "hp"
- the one used by the HP compiler (aCC)
- "edg"
- the one used by the EDG compiler
- "gnu-v3"
- the one used by the GNU C++ compiler (g++) with the V3 ABI.
- "java"
- the one used by the GNU Java compiler (gcj)
- "gnat"
- the one used by the GNU Ada compiler (GNAT).
- --help
- Print a summary of the options to c++filt and exit.
- --version
- Print the version number of c++filt and exit.
- @file
-
Read command-line options from file. The options read are inserted in place of the original @ file option. If file does not exist, or cannot be read, then the option will be treated literally, and not removed.
FOOTNOTES
- 1.
- MS-DOS does not allow "+" characters in file names, so on MS-DOS this program is named CXXFILT.
SEE ALSO
the Info entries for binutils.COPYRIGHT
Copyright (c) 1991-2024 Free Software Foundation, Inc.2024-11-29 | binutils-2.43.1 |