1 .\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
9 .de Vb \" Begin verbatim text
14 .de Ve \" End verbatim text
18 .\" Set up some character translations and predefined strings. \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
49 .\" If the F register is >0, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD. Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
54 .\" Avoid warning from groff about undefined register 'F'.
58 .if \n(.g .if rF .nr rF 1
59 .if (\n(rF:(\n(.g==0)) \{\
62 . tm Index:\\$1\t\\n%\t"\\$2"
72 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
73 .\" Fear. Run. Save yourself. No user-serviceable parts.
74 . \" fudge factors for nroff and troff
83 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
89 . \" simple accents for nroff and troff
99 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
100 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
101 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
102 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
103 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
104 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
106 . \" troff and (daisy-wheel) nroff accents
107 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
108 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
109 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
110 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
111 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
112 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
113 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
114 .ds ae a\h'-(\w'a'u*4/10)'e
115 .ds Ae A\h'-(\w'A'u*4/10)'E
116 . \" corrections for vroff
117 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
118 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
119 . \" for low resolution devices (crt and lpr)
120 .if \n(.H>23 .if \n(.V>19 \
133 .\" ========================================================================
135 .IX Title "C++FILT 1"
136 .TH C++FILT 1 "2022-02-09" "binutils-2.38" "GNU Development Tools"
137 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
138 .\" way too many mistakes in technical documents.
142 cxxfilt \- demangle C++ and Java symbols
144 .IX Header "SYNOPSIS"
145 c++filt [\fB\-_\fR|\fB\-\-strip\-underscore\fR]
146 [\fB\-n\fR|\fB\-\-no\-strip\-underscore\fR]
147 [\fB\-p\fR|\fB\-\-no\-params\fR]
148 [\fB\-t\fR|\fB\-\-types\fR]
149 [\fB\-i\fR|\fB\-\-no\-verbose\fR]
150 [\fB\-r\fR|\fB\-\-no\-recurse\-limit\fR]
151 [\fB\-R\fR|\fB\-\-recurse\-limit\fR]
152 [\fB\-s\fR \fIformat\fR|\fB\-\-format=\fR\fIformat\fR]
153 [\fB\-\-help\fR] [\fB\-\-version\fR] [\fIsymbol\fR...]
155 .IX Header "DESCRIPTION"
156 The \*(C+ and Java languages provide function overloading, which means
157 that you can write many functions with the same name, providing that
158 each function takes parameters of different types. In order to be
159 able to distinguish these similarly named functions \*(C+ and Java
160 encode them into a low-level assembler name which uniquely identifies
161 each different version. This process is known as \fImangling\fR. The
164 program does the inverse mapping: it decodes (\fIdemangles\fR) low-level
165 names into user-level names so that they can be read.
167 Every alphanumeric word (consisting of letters, digits, underscores,
168 dollars, or periods) seen in the input is a potential mangled name.
169 If the name decodes into a \*(C+ name, the \*(C+ name replaces the
170 low-level name in the output, otherwise the original word is output.
171 In this way you can pass an entire assembler source file, containing
172 mangled names, through \fBc++filt\fR and see the same source file
173 containing demangled names.
175 You can also use \fBc++filt\fR to decipher individual symbols by
176 passing them on the command line:
182 If no \fIsymbol\fR arguments are given, \fBc++filt\fR reads symbol
183 names from the standard input instead. All the results are printed on
184 the standard output. The difference between reading names from the
185 command line versus reading names from the standard input is that
186 command-line arguments are expected to be just mangled names and no
187 checking is performed to separate them from surrounding text. Thus
194 will work and demangle the name to \*(L"f()\*(R" whereas:
197 \& c++filt \-n _Z1fv,
200 will not work. (Note the extra comma at the end of the mangled
201 name which makes it invalid). This command however will work:
204 \& echo _Z1fv, | c++filt \-n
207 and will display \*(L"f(),\*(R", i.e., the demangled name followed by a
208 trailing comma. This behaviour is because when the names are read
209 from the standard input it is expected that they might be part of an
210 assembler source file where there might be extra, extraneous
211 characters trailing after a mangled name. For example:
214 \& .type _Z1fv, @function
221 .IP "\fB\-\-strip\-underscore\fR" 4
222 .IX Item "--strip-underscore"
224 On some systems, both the C and \*(C+ compilers put an underscore in front
225 of every name. For example, the C name \f(CW\*(C`foo\*(C'\fR gets the low-level
226 name \f(CW\*(C`_foo\*(C'\fR. This option removes the initial underscore. Whether
227 \&\fBc++filt\fR removes the underscore by default is target dependent.
231 .IP "\fB\-\-no\-strip\-underscore\fR" 4
232 .IX Item "--no-strip-underscore"
234 Do not remove the initial underscore.
238 .IP "\fB\-\-no\-params\fR" 4
239 .IX Item "--no-params"
241 When demangling the name of a function, do not display the types of
242 the function's parameters.
246 .IP "\fB\-\-types\fR" 4
249 Attempt to demangle types as well as function names. This is disabled
250 by default since mangled types are normally only used internally in
251 the compiler, and they can be confused with non-mangled names. For example,
252 a function called \*(L"a\*(R" treated as a mangled type name would be
253 demangled to \*(L"signed char\*(R".
257 .IP "\fB\-\-no\-verbose\fR" 4
258 .IX Item "--no-verbose"
260 Do not include implementation details (if any) in the demangled
267 .IP "\fB\-\-recurse\-limit\fR" 4
268 .IX Item "--recurse-limit"
269 .IP "\fB\-\-no\-recurse\-limit\fR" 4
270 .IX Item "--no-recurse-limit"
271 .IP "\fB\-\-recursion\-limit\fR" 4
272 .IX Item "--recursion-limit"
273 .IP "\fB\-\-no\-recursion\-limit\fR" 4
274 .IX Item "--no-recursion-limit"
276 Enables or disables a limit on the amount of recursion performed
277 whilst demangling strings. Since the name mangling formats allow for
278 an infinite level of recursion it is possible to create strings whose
279 decoding will exhaust the amount of stack space available on the host
280 machine, triggering a memory fault. The limit tries to prevent this
281 from happening by restricting recursion to 2048 levels of nesting.
283 The default is for this limit to be enabled, but disabling it may be
284 necessary in order to demangle truly complicated names. Note however
285 that if the recursion limit is disabled then stack exhaustion is
286 possible and any bug reports about such an event will be rejected.
288 The \fB\-r\fR option is a synonym for the
289 \&\fB\-\-no\-recurse\-limit\fR option. The \fB\-R\fR option is a
290 synonym for the \fB\-\-recurse\-limit\fR option.
291 .IP "\fB\-s\fR \fIformat\fR" 4
294 .IP "\fB\-\-format=\fR\fIformat\fR" 4
295 .IX Item "--format=format"
297 \&\fBc++filt\fR can decode various methods of mangling, used by
298 different compilers. The argument to this option selects which
301 .ie n .IP """auto""" 4
302 .el .IP "\f(CWauto\fR" 4
304 Automatic selection based on executable (the default method)
305 .ie n .IP """gnu""" 4
306 .el .IP "\f(CWgnu\fR" 4
308 the one used by the \s-1GNU \*(C+\s0 compiler (g++)
309 .ie n .IP """lucid""" 4
310 .el .IP "\f(CWlucid\fR" 4
312 the one used by the Lucid compiler (lcc)
313 .ie n .IP """arm""" 4
314 .el .IP "\f(CWarm\fR" 4
316 the one specified by the \*(C+ Annotated Reference Manual
318 .el .IP "\f(CWhp\fR" 4
320 the one used by the \s-1HP\s0 compiler (aCC)
321 .ie n .IP """edg""" 4
322 .el .IP "\f(CWedg\fR" 4
324 the one used by the \s-1EDG\s0 compiler
325 .ie n .IP """gnu\-v3""" 4
326 .el .IP "\f(CWgnu\-v3\fR" 4
328 the one used by the \s-1GNU \*(C+\s0 compiler (g++) with the V3 \s-1ABI.\s0
329 .ie n .IP """java""" 4
330 .el .IP "\f(CWjava\fR" 4
332 the one used by the \s-1GNU\s0 Java compiler (gcj)
333 .ie n .IP """gnat""" 4
334 .el .IP "\f(CWgnat\fR" 4
336 the one used by the \s-1GNU\s0 Ada compiler (\s-1GNAT\s0).
340 .IP "\fB\-\-help\fR" 4
342 Print a summary of the options to \fBc++filt\fR and exit.
343 .IP "\fB\-\-version\fR" 4
345 Print the version number of \fBc++filt\fR and exit.
346 .IP "\fB@\fR\fIfile\fR" 4
348 Read command-line options from \fIfile\fR. The options read are
349 inserted in place of the original @\fIfile\fR option. If \fIfile\fR
350 does not exist, or cannot be read, then the option will be treated
351 literally, and not removed.
353 Options in \fIfile\fR are separated by whitespace. A whitespace
354 character may be included in an option by surrounding the entire
355 option in either single or double quotes. Any character (including a
356 backslash) may be included by prefixing the character to be included
357 with a backslash. The \fIfile\fR may itself contain additional
358 @\fIfile\fR options; any such options will be processed recursively.
360 .IX Header "FOOTNOTES"
362 MS-DOS does not allow \f(CW\*(C`+\*(C'\fR characters in file names, so on
363 MS-DOS this program is named \fB\s-1CXXFILT\s0\fR.
365 .IX Header "SEE ALSO"
366 the Info entries for \fIbinutils\fR.
368 .IX Header "COPYRIGHT"
369 Copyright (c) 1991\-2022 Free Software Foundation, Inc.
371 Permission is granted to copy, distribute and/or modify this document
372 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3
373 or any later version published by the Free Software Foundation;
374 with no Invariant Sections, with no Front-Cover Texts, and with no
375 Back-Cover Texts. A copy of the license is included in the
376 section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".