aboutsummaryrefslogtreecommitdiff
path: root/binutils/c++filt.1
diff options
context:
space:
mode:
authorDavid MacKenzie <djm@cygnus>1993-06-28 02:17:13 +0000
committerDavid MacKenzie <djm@cygnus>1993-06-28 02:17:13 +0000
commitb26ac61376d5075ba809a72b04aeda402d8bc402 (patch)
tree732e9ad94b516a8c8ee7322f71cd1216e454b1b6 /binutils/c++filt.1
parent6214895281c6ab1032c99a3f1a644ad3d3575be3 (diff)
downloadgdb-b26ac61376d5075ba809a72b04aeda402d8bc402.zip
gdb-b26ac61376d5075ba809a72b04aeda402d8bc402.tar.gz
gdb-b26ac61376d5075ba809a72b04aeda402d8bc402.tar.bz2
* Makefile.in: Note dependencies on bucomm.h.
(cplus-dem.o): Link c++filt with version.o. * strings.c: Include bucomm.h and add prototypes to other decls. Remove -h option. * bucomm.h: Declare xrealloc. * nm.c, objcopy.c, objdump.c, size.c, strings.c (main, usage): Add --help option. Put "GNU" in the version message. (usage): Take stream and exit status as args. (main): Pass new args to usage.
Diffstat (limited to 'binutils/c++filt.1')
-rw-r--r--binutils/c++filt.167
1 files changed, 49 insertions, 18 deletions
diff --git a/binutils/c++filt.1 b/binutils/c++filt.1
index d3e8365..c8a64c5 100644
--- a/binutils/c++filt.1
+++ b/binutils/c++filt.1
@@ -8,30 +8,35 @@
..
.SH NAME
-c++filt\(em\&demangles C++ symbols
+c++filt\(em\&demangle C++ symbols
.SH SYNOPSIS
+.hy 0
+.na
+.TP
.B c++filt
-[
-.B -_
-]
-
+.RB "[\|" \-_ | \-\-strip-underscores "\|]"
+.RB "[\|" "\-s {gnu,lucid,arm} " | " \-\-format={gnu,lucid,arm}" "\|]"
+.RB "[\|" \-\-help "\|]"
+.RB "[\|" \-\-version "\|]"
+.RB "[\|" arg "...\|]"
.SH DESCRIPTION
The C++ language provides function overloading, which means that you can
write many functions with the same name (providing each takes parameters
of different types). All C++ function names are encoded into a
-low-level assembly label (in some circles this is described as
-@dfn{mangling}). The
+low-level assembly label (this process is known as
+.I mangling\c
+). The
.B c++filt
program does the inverse mapping: it decodes (\fIdemangles\fR)
low-level names into user-level names so that the linker can keep
these overloaded functions from clashing.
-
+.PP
Every alphanumeric word (consisting of letters, digits, underscores,
dollars, or periods) seen in the input is a potential label. If the
label decodes into a C++ name, the C++ name replaces the low-level
name in the output.
-
+.PP
A typical use of
.B c++filt
is to pipe the output of
@@ -43,22 +48,48 @@ as a filter:
.RS
.B nm \fIobjfile\fB | c++filt
.RE
-
+.PP
You can also use
.B c++filt
to decipher individual symbols by specifying these symbols on the
command line.
-
+.PP
All results are printed on the standard output.
-
-Note that on some systems, both the C and C++ compilers put an
-underscore in front of every name. (I.e. the C name
+.SH OPTIONS
+.TP
+.B \-_
+.TP
+.B \-\-strip\-underscores
+On some systems, both the C and C++ compilers put an
+underscore in front of every name. For example, the C name
.B foo
gets the low-level name
-.BR _foo .)
-To remove the leading underscore, specify the option
-.B -_
-on the command line.
+.BR _foo .
+This option removes the leading underscore.
+
+.TP
+.B "\-s {gnu,lucid,arm}"
+.TP
+.B \-\-format={gnu,lucid,arm}
+GNU
+.B nm
+can decode three different methods of mangling, used by different C++
+compilers. This option selects which method it uses: the one used by
+the GNU compiler, the one used by the Lucid compiler, or the one
+specified by the C++ Annotated Reference Manual. The default is the
+GNU style.
+
+.TP
+.B \-\-help
+Print a summary of the options to
+.B c++filt
+and exit.
+
+.TP
+.B \-\-version
+Print the version number of
+.B c++filt
+and exit.
.SH "SEE ALSO"
.RB "`\|" binutils "\|'"