diff options
author | David MacKenzie <djm@cygnus> | 1993-08-13 00:02:25 +0000 |
---|---|---|
committer | David MacKenzie <djm@cygnus> | 1993-08-13 00:02:25 +0000 |
commit | d6a4c375697112e9f8d35e787e703464708fa052 (patch) | |
tree | 9adc2f8b3f2c5ac525358f8b6814a50fb57a8d78 /binutils/binutils.texi | |
parent | 8b46d73404b9d7d8010975e68a1279f11dfc2671 (diff) | |
download | gdb-d6a4c375697112e9f8d35e787e703464708fa052.zip gdb-d6a4c375697112e9f8d35e787e703464708fa052.tar.gz gdb-d6a4c375697112e9f8d35e787e703464708fa052.tar.bz2 |
* Makefile.in ($(NM_PROG)): Depend on demangle.o.
(demangle.o): New target.
(cplus-dem.o): Depend on it, to force compilation order when doing
parallel compiles.
* nm.c (print_symbol_info_{bsd,sysv,posix}): Take a bfd arg.
(struct output_fns print_symbol_info): Ditto.
(long_options, usage, main): Add -C --demangle option.
(print_symname): New function, demangling if requested.
(print_symbols, print_symbol_info_{bsd,sysv,posix}): Use it.
Diffstat (limited to 'binutils/binutils.texi')
-rw-r--r-- | binutils/binutils.texi | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/binutils/binutils.texi b/binutils/binutils.texi index 383d6b2..ae4010a 100644 --- a/binutils/binutils.texi +++ b/binutils/binutils.texi @@ -639,7 +639,8 @@ The GNU linker @code{ld} is now described in a separate manual. @kindex nm @smallexample -nm [ -a | --debug-syms ] [ -g | --extern-only ] [ -B ] +nm [ -a | --debug-syms ] [ -g | --extern-only ] + [ -B ] [ -C | --demangle ] [ -s | --print-armap ] [ -A | -o | --print-file-name ] [ -n | -v | --numeric-sort ] [ -p | --no-sort ] [ -r | --reverse-sort ] [ -u | --undefined-only ] @@ -716,7 +717,15 @@ listed. @item -B @cindex @code{nm} format @cindex @code{nm} compatibility -The same as @samp{--format=bsd}. +The same as @samp{--format=bsd} (for compatibility with the MIPS @code{nm}). + +@item -C +@itemx --demangle +@cindex demangling C++ symbols +Decode (@dfn{demangle}) low-level symbol names into user-level names. +Besides removing any initial underscore prepended by the system, this +makes C++ function names readable. @xref{c++filt}, for more information +on demangling. @item -f @var{format} @itemx --format=@var{format} @@ -1188,7 +1197,7 @@ archives, @samp{strip -v} lists all members of the archive. @smallexample c++filt [ -_ | --strip-underscores ] [ -s @var{format} | --format=@var{format} ] - [ --help ] [ --version ] [ @var{arg}@dots{} ] + [ --help ] [ --version ] [ @var{symbol}@dots{} ] @end smallexample The C++ language provides function overloading, which means that you can @@ -1204,20 +1213,15 @@ 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, 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: +You can use @code{c++filt} to decipher individual symbols: @example c++filt @var{symbol} @end example -All results are printed on the standard output. +If no @var{symbol} arguments are given, @code{c++filt} reads symbol +names from the standard input and writes the demangled names to the +standard output. All results are printed on the standard output. @table @code @item -_ |