aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJeffrey Osier <jeffrey@cygnus>1993-05-28 00:00:59 +0000
committerJeffrey Osier <jeffrey@cygnus>1993-05-28 00:00:59 +0000
commit6c69b6bde1422949d3825d9c0cb286c07c59984b (patch)
treef4572b7455864418b31ad2cc8824de7ab29fccea /binutils
parenteba2bc94c3d6abfde2aa2c8485445a683f1e2d21 (diff)
downloadgdb-6c69b6bde1422949d3825d9c0cb286c07c59984b.zip
gdb-6c69b6bde1422949d3825d9c0cb286c07c59984b.tar.gz
gdb-6c69b6bde1422949d3825d9c0cb286c07c59984b.tar.bz2
* biutils.texi: revised c++filt chapter
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/binutils.texi39
2 files changed, 29 insertions, 14 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 1c55ee8..7071e4e 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+Thu May 27 16:58:31 1993 Jeffrey Osier (jeffrey@cygnus.com)
+
+ * biutils.texi: revised c++filt chapter
+
Wed May 26 17:24:17 1993 Ian Lance Taylor (ian@cygnus.com)
* Makefile.in (FLAGS_TO_PASS): Pass down CC and CFLAGS.
diff --git a/binutils/binutils.texi b/binutils/binutils.texi
index f8f7845..22af2de 100644
--- a/binutils/binutils.texi
+++ b/binutils/binutils.texi
@@ -1102,22 +1102,33 @@ archives, @samp{strip -v} lists all members of the archive.
@kindex c++filt
@cindex demangling C++ symbols
-The C++ language provides function overloading, which means that
-you can write many function with the same name (but taking
-different kinds of parameters). So that the linker can keep these
-overloaded functions from clashing, all C++ function names are
-encoded (``mangled'') into a funny-looking low-level assembly label.
-The @code{c++filt} program does the inverse mapping: It decodes
-(``demangles'') low-level names into user-level names.
-
-When you use @code{c++filt} as a filter (which is usually the case),
-it reads from standard input. 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 will replace the low-level name in the output.
+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 @code{c++filt} program does the inverse mapping: it
+decodes (@dfn{demangles}) low-level names into user-level names so that
+the linker can keep these overloaded functions from clashing.
+
+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.
A typical use of @code{c++filt} is to pipe the output of @code{nm}
-though it.
+though it, using @code{c++filt} as a filter:
+
+@example
+nm @var{objfile} | c++filt
+@end example
+
+You can also use @code{c++filt} to decipher individual symbols:
+
+@example
+c++filt @var{symbol}
+@end example
+
+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 @code{foo} gets the