Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / man / man1 / c++filt.1
blobdcfc62a67f621ad86c1acac5d53371cd46fab202
1 .\" Automatically generated by Pod::Man version 1.15
2 .\" Thu Jan 19 19:58:59 2006
3 .\"
4 .\" Standard preamble:
5 .\" ======================================================================
6 .de Sh \" Subsection heading
7 .br
8 .if t .Sp
9 .ne 5
10 .PP
11 \fB\\$1\fR
12 .PP
14 .de Sp \" Vertical space (when we can't use .PP)
15 .if t .sp .5v
16 .if n .sp
18 .de Ip \" List item
19 .br
20 .ie \\n(.$>=3 .ne \\$3
21 .el .ne 3
22 .IP "\\$1" \\$2
24 .de Vb \" Begin verbatim text
25 .ft CW
26 .nf
27 .ne \\$1
29 .de Ve \" End verbatim text
30 .ft R
32 .fi
34 .\" Set up some character translations and predefined strings.  \*(-- will
35 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
36 .\" double quote, and \*(R" will give a right double quote.  | will give a
37 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used
38 .\" to do unbreakable dashes and therefore won't be available.  \*(C` and
39 .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
40 .tr \(*W-|\(bv\*(Tr
41 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
42 .ie n \{\
43 .    ds -- \(*W-
44 .    ds PI pi
45 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
46 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
47 .    ds L" ""
48 .    ds R" ""
49 .    ds C` ""
50 .    ds C' ""
51 'br\}
52 .el\{\
53 .    ds -- \|\(em\|
54 .    ds PI \(*p
55 .    ds L" ``
56 .    ds R" ''
57 'br\}
58 .\"
59 .\" If the F register is turned on, we'll generate index entries on stderr
60 .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
61 .\" index entries marked with X<> in POD.  Of course, you'll have to process
62 .\" the output yourself in some meaningful fashion.
63 .if \nF \{\
64 .    de IX
65 .    tm Index:\\$1\t\\n%\t"\\$2"
67 .    nr % 0
68 .    rr F
69 .\}
70 .\"
71 .\" For nroff, turn off justification.  Always turn off hyphenation; it
72 .\" makes way too many mistakes in technical documents.
73 .hy 0
74 .\"
75 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
76 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
77 .bd B 3
78 .    \" fudge factors for nroff and troff
79 .if n \{\
80 .    ds #H 0
81 .    ds #V .8m
82 .    ds #F .3m
83 .    ds #[ \f1
84 .    ds #] \fP
85 .\}
86 .if t \{\
87 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
88 .    ds #V .6m
89 .    ds #F 0
90 .    ds #[ \&
91 .    ds #] \&
92 .\}
93 .    \" simple accents for nroff and troff
94 .if n \{\
95 .    ds ' \&
96 .    ds ` \&
97 .    ds ^ \&
98 .    ds , \&
99 .    ds ~ ~
100 .    ds /
102 .if t \{\
103 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
104 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
105 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
106 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
107 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
108 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
110 .    \" troff and (daisy-wheel) nroff accents
111 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
112 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
113 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
114 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
115 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
116 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
117 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
118 .ds ae a\h'-(\w'a'u*4/10)'e
119 .ds Ae A\h'-(\w'A'u*4/10)'E
120 .    \" corrections for vroff
121 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
122 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
123 .    \" for low resolution devices (crt and lpr)
124 .if \n(.H>23 .if \n(.V>19 \
126 .    ds : e
127 .    ds 8 ss
128 .    ds o a
129 .    ds d- d\h'-1'\(ga
130 .    ds D- D\h'-1'\(hy
131 .    ds th \o'bp'
132 .    ds Th \o'LP'
133 .    ds ae ae
134 .    ds Ae AE
136 .rm #[ #] #H #V #F C
137 .\" ======================================================================
139 .IX Title "C++FILT 1"
140 .TH C++FILT 1 "binutils-2.16.91" "2006-01-19" "GNU Development Tools"
142 .SH "NAME"
143 c++filt \- Demangle \*(C+ and Java symbols.
144 .SH "SYNOPSIS"
145 .IX Header "SYNOPSIS"
146 c++filt [\fB\-_\fR|\fB\*(--strip-underscores\fR]
147         [\fB\-n\fR|\fB\*(--no-strip-underscores\fR]
148         [\fB\-p\fR|\fB\*(--no-params\fR]
149         [\fB\-t\fR|\fB\*(--types\fR]
150         [\fB\-i\fR|\fB\*(--no-verbose\fR]
151         [\fB\-s\fR \fIformat\fR|\fB\*(--format=\fR\fIformat\fR]
152         [\fB\*(--help\fR]  [\fB\*(--version\fR]  [\fIsymbol\fR...]
153 .SH "DESCRIPTION"
154 .IX Header "DESCRIPTION"
155 The \*(C+ and Java languages provide function overloading, which means
156 that you can write many functions with the same name, providing that
157 each function takes parameters of different types.  In order to be
158 able to distinguish these similarly named functions \*(C+ and Java
159 encode them into a low-level assembler name which uniquely identifies
160 each different version.  This process is known as \fImangling\fR. The
161 \&\fBc++filt\fR
163 program does the inverse mapping: it decodes (\fIdemangles\fR) low-level
164 names into user-level names so that they can be read.
166 Every alphanumeric word (consisting of letters, digits, underscores,
167 dollars, or periods) seen in the input is a potential mangled name.
168 If the name decodes into a \*(C+ name, the \*(C+ name replaces the
169 low-level name in the output, otherwise the original word is output.
170 In this way you can pass an entire assembler source file, containing
171 mangled names, through \fBc++filt\fR and see the same source file
172 containing demangled names.
174 You can also use \fBc++filt\fR to decipher individual symbols by
175 passing them on the command line:
177 .Vb 1
178 \&        c++filt <symbol>
180 If no \fIsymbol\fR arguments are given, \fBc++filt\fR reads symbol
181 names from the standard input instead.  All the results are printed on
182 the standard output.  The difference between reading names from the
183 command line versus reading names from the standard input is that
184 command line arguments are expected to be just mangled names and no
185 checking is performed to seperate them from surrounding text.  Thus
186 for example:
188 .Vb 1
189 \&        c++filt -n _Z1fv
191 will work and demangle the name to \*(L"\fIf()\fR\*(R" whereas:
193 .Vb 1
194 \&        c++filt -n _Z1fv,
196 will not work.  (Note the extra comma at the end of the mangled
197 name which makes it invalid).  This command however will work:
199 .Vb 1
200 \&        echo _Z1fv, | c++filt -n
202 and will display \*(L"\fIf()\fR,\*(R" ie the demangled name followed by a
203 trailing comma.  This behaviour is because when the names are read
204 from the standard input it is expected that they might be part of an
205 assembler source file where there might be extra, extraneous
206 characters trailing after a mangled name.  eg:
208 .Vb 1
209 \&            .type   _Z1fv, @function
211 .SH "OPTIONS"
212 .IX Header "OPTIONS"
213 .Ip "\fB\-_\fR" 4
214 .IX Item "-_"
215 .PD 0
216 .Ip "\fB\*(--strip-underscores\fR" 4
217 .IX Item "strip-underscores"
219 On some systems, both the C and \*(C+ compilers put an underscore in front
220 of every name.  For example, the C name \f(CW\*(C`foo\*(C'\fR gets the low-level
221 name \f(CW\*(C`_foo\*(C'\fR.  This option removes the initial underscore.  Whether
222 \&\fBc++filt\fR removes the underscore by default is target dependent.
223 .Ip "\fB\-j\fR" 4
224 .IX Item "-j"
225 .PD 0
226 .Ip "\fB\*(--java\fR" 4
227 .IX Item "java"
229 Prints demangled names using Java syntax.  The default is to use \*(C+
230 syntax.
231 .Ip "\fB\-n\fR" 4
232 .IX Item "-n"
233 .PD 0
234 .Ip "\fB\*(--no-strip-underscores\fR" 4
235 .IX Item "no-strip-underscores"
237 Do not remove the initial underscore.
238 .Ip "\fB\-p\fR" 4
239 .IX Item "-p"
240 .PD 0
241 .Ip "\fB\*(--no-params\fR" 4
242 .IX Item "no-params"
244 When demangling the name of a function, do not display the types of
245 the function's parameters.
246 .Ip "\fB\-t\fR" 4
247 .IX Item "-t"
248 .PD 0
249 .Ip "\fB\*(--types\fR" 4
250 .IX Item "types"
252 Attempt to demangle types as well as function names.  This is disabled
253 by default since mangled types are normally only used internally in
254 the compiler, and they can be confused with non-mangled names.  eg
255 a function called \*(L"a\*(R" treated as a mangled type name would be
256 demangled to \*(L"signed char\*(R".
257 .Ip "\fB\-i\fR" 4
258 .IX Item "-i"
259 .PD 0
260 .Ip "\fB\*(--no-verbose\fR" 4
261 .IX Item "no-verbose"
263 Do not include implementation details (if any) in the demangled
264 output.
265 .Ip "\fB\-s\fR \fIformat\fR" 4
266 .IX Item "-s format"
267 .PD 0
268 .Ip "\fB\*(--format=\fR\fIformat\fR" 4
269 .IX Item "format=format"
271 \&\fBc++filt\fR can decode various methods of mangling, used by
272 different compilers.  The argument to this option selects which
273 method it uses:
274 .RS 4
275 .if n .Ip "\f(CW""""auto""""\fR" 4
276 .el .Ip "\f(CWauto\fR" 4
277 .IX Item "auto"
278 Automatic selection based on executable (the default method)
279 .if n .Ip "\f(CW""""gnu""""\fR" 4
280 .el .Ip "\f(CWgnu\fR" 4
281 .IX Item "gnu"
282 the one used by the \s-1GNU\s0 \*(C+ compiler (g++)
283 .if n .Ip "\f(CW""""lucid""""\fR" 4
284 .el .Ip "\f(CWlucid\fR" 4
285 .IX Item "lucid"
286 the one used by the Lucid compiler (lcc)
287 .if n .Ip "\f(CW""""arm""""\fR" 4
288 .el .Ip "\f(CWarm\fR" 4
289 .IX Item "arm"
290 the one specified by the \*(C+ Annotated Reference Manual
291 .if n .Ip "\f(CW""""hp""""\fR" 4
292 .el .Ip "\f(CWhp\fR" 4
293 .IX Item "hp"
294 the one used by the \s-1HP\s0 compiler (aCC)
295 .if n .Ip "\f(CW""""edg""""\fR" 4
296 .el .Ip "\f(CWedg\fR" 4
297 .IX Item "edg"
298 the one used by the \s-1EDG\s0 compiler
299 .if n .Ip "\f(CW""""gnu\-v3""""\fR" 4
300 .el .Ip "\f(CWgnu\-v3\fR" 4
301 .IX Item "gnu-v3"
302 the one used by the \s-1GNU\s0 \*(C+ compiler (g++) with the V3 \s-1ABI\s0.
303 .if n .Ip "\f(CW""""java""""\fR" 4
304 .el .Ip "\f(CWjava\fR" 4
305 .IX Item "java"
306 the one used by the \s-1GNU\s0 Java compiler (gcj)
307 .if n .Ip "\f(CW""""gnat""""\fR" 4
308 .el .Ip "\f(CWgnat\fR" 4
309 .IX Item "gnat"
310 the one used by the \s-1GNU\s0 Ada compiler (\s-1GNAT\s0).
312 .RS 4
314 .Ip "\fB\*(--help\fR" 4
315 .IX Item "help"
316 Print a summary of the options to \fBc++filt\fR and exit.
317 .Ip "\fB\*(--version\fR" 4
318 .IX Item "version"
319 Print the version number of \fBc++filt\fR and exit.
320 .Ip "\fB@\fR\fIfile\fR" 4
321 .IX Item "@file"
322 Read command-line options from \fIfile\fR.  The options read are
323 inserted in place of the original @\fIfile\fR option.  If \fIfile\fR
324 does not exist, or cannot be read, then the option will be treated
325 literally, and not removed.  
327 Options in \fIfile\fR are separated by whitespace.  A whitespace
328 character may be included in an option by surrounding the entire
329 option in either single or double quotes.  Any character (including a
330 backslash) may be included by prefixing the character to be included
331 with a backslash.  The \fIfile\fR may itself contain additional
332 @\fIfile\fR options; any such options will be processed recursively.
333 .SH "FOOTNOTES"
334 .IX Header "FOOTNOTES"
335 .Ip "1." 4
336 \&\s-1MS-DOS\s0 does not allow \f(CW\*(C`+\*(C'\fR characters in file names, so on 
337 \&\s-1MS-DOS\s0 this program is named \fB\s-1CXXFILT\s0\fR.
338 .SH "SEE ALSO"
339 .IX Header "SEE ALSO"
340 the Info entries for \fIbinutils\fR.
341 .SH "COPYRIGHT"
342 .IX Header "COPYRIGHT"
343 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
344 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
346 Permission is granted to copy, distribute and/or modify this document
347 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
348 or any later version published by the Free Software Foundation;
349 with no Invariant Sections, with no Front-Cover Texts, and with no
350 Back-Cover Texts.  A copy of the license is included in the
351 section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".