Commit | Line | Data |
---|---|---|
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 | |
11 | c++filt\(em\&demangles C++ symbols | |
12 | ||
13 | .SH SYNOPSIS | |
14 | .B c++filt | |
15 | [ | |
16 | .B -_ | |
17 | ] | |
18 | ||
19 | .SH DESCRIPTION | |
20 | The C++ language provides function overloading, which means that you can | |
21 | write many functions with the same name (providing each takes parameters | |
22 | of different types). All C++ function names are encoded into a | |
23 | low-level assembly label (in some circles this is described as | |
24 | @dfn{mangling}). The | |
25 | .B c++filt | |
26 | program does the inverse mapping: it decodes (\fIdemangles\fR) | |
27 | low-level names into user-level names so that the linker can keep | |
28 | these overloaded functions from clashing. | |
29 | ||
30 | Every alphanumeric word (consisting of letters, digits, underscores, | |
31 | dollars, or periods) seen in the input is a potential label. If the | |
32 | label decodes into a C++ name, the C++ name replaces the low-level | |
33 | name in the output. | |
34 | ||
35 | A typical use of | |
36 | .B c++filt | |
37 | is to pipe the output of | |
38 | .B nm | |
1889f662 | 39 | through it, using |
08ad9921 JO |
40 | .B c++filt |
41 | as a filter: | |
1889f662 | 42 | .br |
08ad9921 JO |
43 | .RS |
44 | .B nm \fIobjfile\fB | c++filt | |
45 | .RE | |
46 | ||
47 | You can also use | |
48 | .B c++filt | |
49 | to decipher individual symbols by specifying these symbols on the | |
50 | command line. | |
51 | ||
52 | All results are printed on the standard output. | |
53 | ||
54 | Note that on some systems, both the C and C++ compilers put an | |
55 | underscore in front of every name. (I.e. the C name | |
56 | .B foo | |
57 | gets the low-level name | |
58 | .BR _foo .) | |
59 | To remove the leading underscore, specify the option | |
60 | .B -_ | |
61 | on the command line. | |
62 | ||
63 | .SH "SEE ALSO" | |
64 | .RB "`\|" binutils "\|'" | |
65 | entry in | |
66 | .B | |
67 | info\c | |
68 | \&; | |
69 | .I | |
70 | The GNU Binary Utilities\c | |
71 | \&, Roland H. Pesch (June 1993). | |
72 | ||
73 | .SH COPYING | |
74 | Copyright (c) 1993 Free Software Foundation, Inc. | |
75 | .PP | |
76 | Permission is granted to make and distribute verbatim copies of | |
77 | this manual provided the copyright notice and this permission notice | |
78 | are preserved on all copies. | |
79 | .PP | |
80 | Permission is granted to copy and distribute modified versions of this | |
81 | manual under the conditions for verbatim copying, provided that the | |
82 | entire resulting derived work is distributed under the terms of a | |
83 | permission notice identical to this one. | |
84 | .PP | |
85 | Permission is granted to copy and distribute translations of this | |
86 | manual into another language, under the above conditions for modified | |
87 | versions, except that this permission notice may be included in | |
88 | translations approved by the Free Software Foundation instead of in | |
89 | the original English. |