fix doc bug
[deliverable/binutils-gdb.git] / binutils / c++filt.1
CommitLineData
08ad9921
JO
1.\" Copyright (c) 1991 Free Software Foundation
2.\" See section COPYING for conditions for redistribution
3.TH c++filt 1 "June 1993" "cygnus support" "GNU Development Tools"
4.de BP
5.sp
6.ti \-.2i
7\(**
8..
9
10.SH NAME
b26ac613 11c++filt\(em\&demangle C++ symbols
08ad9921
JO
12
13.SH SYNOPSIS
b26ac613
DM
14.hy 0
15.na
16.TP
08ad9921 17.B c++filt
b26ac613
DM
18.RB "[\|" \-_ | \-\-strip-underscores "\|]"
19.RB "[\|" "\-s {gnu,lucid,arm} " | " \-\-format={gnu,lucid,arm}" "\|]"
20.RB "[\|" \-\-help "\|]"
21.RB "[\|" \-\-version "\|]"
22.RB "[\|" arg "...\|]"
08ad9921
JO
23.SH DESCRIPTION
24The C++ language provides function overloading, which means that you can
25write many functions with the same name (providing each takes parameters
26of different types). All C++ function names are encoded into a
b26ac613
DM
27low-level assembly label (this process is known as
28.I mangling\c
29). The
08ad9921
JO
30.B c++filt
31program does the inverse mapping: it decodes (\fIdemangles\fR)
32low-level names into user-level names so that the linker can keep
33these overloaded functions from clashing.
b26ac613 34.PP
08ad9921
JO
35Every alphanumeric word (consisting of letters, digits, underscores,
36dollars, or periods) seen in the input is a potential label. If the
37label decodes into a C++ name, the C++ name replaces the low-level
38name in the output.
b26ac613 39.PP
08ad9921
JO
40A typical use of
41.B c++filt
42is to pipe the output of
43.B nm
1889f662 44through it, using
08ad9921
JO
45.B c++filt
46as a filter:
1889f662 47.br
08ad9921
JO
48.RS
49.B nm \fIobjfile\fB | c++filt
50.RE
b26ac613 51.PP
08ad9921
JO
52You can also use
53.B c++filt
54to decipher individual symbols by specifying these symbols on the
55command line.
b26ac613 56.PP
08ad9921 57All results are printed on the standard output.
b26ac613
DM
58.SH OPTIONS
59.TP
60.B \-_
61.TP
62.B \-\-strip\-underscores
63On some systems, both the C and C++ compilers put an
64underscore in front of every name. For example, the C name
08ad9921
JO
65.B foo
66gets the low-level name
b26ac613
DM
67.BR _foo .
68This option removes the leading underscore.
69
70.TP
71.B "\-s {gnu,lucid,arm}"
72.TP
73.B \-\-format={gnu,lucid,arm}
74GNU
75.B nm
76can decode three different methods of mangling, used by different C++
77compilers. This option selects which method it uses: the one used by
78the GNU compiler, the one used by the Lucid compiler, or the one
79specified by the C++ Annotated Reference Manual. The default is the
80GNU style.
81
82.TP
83.B \-\-help
84Print a summary of the options to
85.B c++filt
86and exit.
87
88.TP
89.B \-\-version
90Print the version number of
91.B c++filt
92and exit.
08ad9921
JO
93
94.SH "SEE ALSO"
95.RB "`\|" binutils "\|'"
96entry in
97.B
98info\c
99\&;
100.I
101The GNU Binary Utilities\c
102\&, Roland H. Pesch (June 1993).
103
104.SH COPYING
105Copyright (c) 1993 Free Software Foundation, Inc.
106.PP
107Permission is granted to make and distribute verbatim copies of
108this manual provided the copyright notice and this permission notice
109are preserved on all copies.
110.PP
111Permission is granted to copy and distribute modified versions of this
112manual under the conditions for verbatim copying, provided that the
113entire resulting derived work is distributed under the terms of a
114permission notice identical to this one.
115.PP
116Permission is granted to copy and distribute translations of this
117manual into another language, under the above conditions for modified
118versions, except that this permission notice may be included in
119translations approved by the Free Software Foundation instead of in
120the original English.
This page took 0.035232 seconds and 4 git commands to generate.