1C++FILT(1)                   GNU Development Tools                  C++FILT(1)
2
3
4

NAME

6       c++filt - Demangle C++ and Java symbols.
7

SYNOPSIS

9       c++filt [-_|--strip-underscore]
10               [-n|--no-strip-underscore]
11               [-p|--no-params]
12               [-t|--types]
13               [-i|--no-verbose]
14               [-s format|--format=format]
15               [--help]  [--version]  [symbol...]
16

DESCRIPTION

18       The C++ and Java languages provide function overloading, which means
19       that you can write many functions with the same name, providing that
20       each function takes parameters of different types.  In order to be able
21       to distinguish these similarly named functions C++ and Java encode them
22       into a low-level assembler name which uniquely identifies each
23       different version.  This process is known as mangling. The c++filt [1]
24       program does the inverse mapping: it decodes (demangles) low-level
25       names into user-level names so that they can be read.
26
27       Every alphanumeric word (consisting of letters, digits, underscores,
28       dollars, or periods) seen in the input is a potential mangled name.  If
29       the name decodes into a C++ name, the C++ name replaces the low-level
30       name in the output, otherwise the original word is output.  In this way
31       you can pass an entire assembler source file, containing mangled names,
32       through c++filt and see the same source file containing demangled
33       names.
34
35       You can also use c++filt to decipher individual symbols by passing them
36       on the command line:
37
38               c++filt <symbol>
39
40       If no symbol arguments are given, c++filt reads symbol names from the
41       standard input instead.  All the results are printed on the standard
42       output.  The difference between reading names from the command line
43       versus reading names from the standard input is that command line
44       arguments are expected to be just mangled names and no checking is
45       performed to separate them from surrounding text.  Thus for example:
46
47               c++filt -n _Z1fv
48
49       will work and demangle the name to "f()" whereas:
50
51               c++filt -n _Z1fv,
52
53       will not work.  (Note the extra comma at the end of the mangled name
54       which makes it invalid).  This command however will work:
55
56               echo _Z1fv, | c++filt -n
57
58       and will display "f(),", i.e., the demangled name followed by a
59       trailing comma.  This behaviour is because when the names are read from
60       the standard input it is expected that they might be part of an
61       assembler source file where there might be extra, extraneous characters
62       trailing after a mangled name.  For example:
63
64                   .type   _Z1fv, @function
65

OPTIONS

67       -_
68       --strip-underscore
69           On some systems, both the C and C++ compilers put an underscore in
70           front of every name.  For example, the C name "foo" gets the low-
71           level name "_foo".  This option removes the initial underscore.
72           Whether c++filt removes the underscore by default is target
73           dependent.
74
75       -n
76       --no-strip-underscore
77           Do not remove the initial underscore.
78
79       -p
80       --no-params
81           When demangling the name of a function, do not display the types of
82           the function's parameters.
83
84       -t
85       --types
86           Attempt to demangle types as well as function names.  This is
87           disabled by default since mangled types are normally only used
88           internally in the compiler, and they can be confused with non-
89           mangled names.  For example, a function called "a" treated as a
90           mangled type name would be demangled to "signed char".
91
92       -i
93       --no-verbose
94           Do not include implementation details (if any) in the demangled
95           output.
96
97       -s format
98       --format=format
99           c++filt can decode various methods of mangling, used by different
100           compilers.  The argument to this option selects which method it
101           uses:
102
103           "auto"
104               Automatic selection based on executable (the default method)
105
106           "gnu"
107               the one used by the GNU C++ compiler (g++)
108
109           "lucid"
110               the one used by the Lucid compiler (lcc)
111
112           "arm"
113               the one specified by the C++ Annotated Reference Manual
114
115           "hp"
116               the one used by the HP compiler (aCC)
117
118           "edg"
119               the one used by the EDG compiler
120
121           "gnu-v3"
122               the one used by the GNU C++ compiler (g++) with the V3 ABI.
123
124           "java"
125               the one used by the GNU Java compiler (gcj)
126
127           "gnat"
128               the one used by the GNU Ada compiler (GNAT).
129
130       --help
131           Print a summary of the options to c++filt and exit.
132
133       --version
134           Print the version number of c++filt and exit.
135
136       @file
137           Read command-line options from file.  The options read are inserted
138           in place of the original @file option.  If file does not exist, or
139           cannot be read, then the option will be treated literally, and not
140           removed.
141
142           Options in file are separated by whitespace.  A whitespace
143           character may be included in an option by surrounding the entire
144           option in either single or double quotes.  Any character (including
145           a backslash) may be included by prefixing the character to be
146           included with a backslash.  The file may itself contain additional
147           @file options; any such options will be processed recursively.
148

FOOTNOTES

150       1.  MS-DOS does not allow "+" characters in file names, so on MS-DOS
151           this program is named CXXFILT.
152

SEE ALSO

154       the Info entries for binutils.
155
157       Copyright (c) 1991-2013 Free Software Foundation, Inc.
158
159       Permission is granted to copy, distribute and/or modify this document
160       under the terms of the GNU Free Documentation License, Version 1.3 or
161       any later version published by the Free Software Foundation; with no
162       Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
163       Texts.  A copy of the license is included in the section entitled "GNU
164       Free Documentation License".
165
166
167
168binutils-2.24                     2019-07-25                        C++FILT(1)
Impressum