1C++FILT(1) GNU Development Tools C++FILT(1)
2
3
4
6 c++filt - Demangle C++ and Java symbols.
7
9 c++filt [-_⎪--strip-underscores]
10 [-j⎪--java]
11 [-n⎪--no-strip-underscores]
12 [-p⎪--no-params]
13 [-s format⎪--format=format]
14 [--help] [--version] [symbol...]
15
17 The C++ and Java languages provides function overloading, which means
18 that you can write many functions with the same name (providing each
19 takes parameters of different types). All C++ and Java function names
20 are encoded into a low-level assembly label (this process is known as
21 mangling). The c++filt [1] program does the inverse mapping: it decodes
22 (demangles) low-level names into user-level names so that the linker
23 can keep these overloaded functions from clashing.
24
25 Every alphanumeric word (consisting of letters, digits, underscores,
26 dollars, or periods) seen in the input is a potential label. If the
27 label decodes into a C++ name, the C++ name replaces the low-level name
28 in the output.
29
30 You can use c++filt to decipher individual symbols:
31
32 c++filt <symbol>
33
34 If no symbol arguments are given, c++filt reads symbol names from the
35 standard input and writes the demangled names to the standard output.
36 All results are printed on the standard output.
37
39 -_
40 --strip-underscores
41 On some systems, both the C and C++ compilers put an underscore in
42 front of every name. For example, the C name "foo" gets the low-
43 level name "_foo". This option removes the initial underscore.
44 Whether c++filt removes the underscore by default is target depen‐
45 dent.
46
47 -j
48 --java
49 Prints demangled names using Java syntax. The default is to use
50 C++ syntax.
51
52 -n
53 --no-strip-underscores
54 Do not remove the initial underscore.
55
56 -p
57 --no-params
58 When demangling the name of a function, do not display the types of
59 the function's parameters.
60
61 -s format
62 --format=format
63 c++filt can decode various methods of mangling, used by different
64 compilers. The argument to this option selects which method it
65 uses:
66
67 "auto"
68 Automatic selection based on executable (the default method)
69
70 "gnu"
71 the one used by the GNU C++ compiler (g++)
72
73 "lucid"
74 the one used by the Lucid compiler (lcc)
75
76 "arm"
77 the one specified by the C++ Annotated Reference Manual
78
79 "hp"
80 the one used by the HP compiler (aCC)
81
82 "edg"
83 the one used by the EDG compiler
84
85 "gnu-v3"
86 the one used by the GNU C++ compiler (g++) with the V3 ABI.
87
88 "java"
89 the one used by the GNU Java compiler (gcj)
90
91 "gnat"
92 the one used by the GNU Ada compiler (GNAT).
93
94 --help
95 Print a summary of the options to c++filt and exit.
96
97 --version
98 Print the version number of c++filt and exit.
99
101 1. MS-DOS does not allow "+" characters in file names, so on MS-DOS
102 this program is named CXXFILT.
103
105 the Info entries for binutils.
106
108 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
109 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
110
111 Permission is granted to copy, distribute and/or modify this document
112 under the terms of the GNU Free Documentation License, Version 1.1 or
113 any later version published by the Free Software Foundation; with no
114 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
115 Texts. A copy of the license is included in the section entitled ``GNU
116 Free Documentation License''.
117
118
119
120binutils-2.15.97 2005-04-20 C++FILT(1)