aboutsummaryrefslogtreecommitdiff
path: root/binutils/nm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-04-19 10:43:47 +0000
committerAlan Modra <amodra@gmail.com>2007-04-19 10:43:47 +0000
commited180cc5dbf8d2fe7f3eb17215badc90a8a453a9 (patch)
treeaf2edb74e47e3096c253376babbb73f849d0481b /binutils/nm.c
parent01e76792975830272df446256851f586a58cf1a9 (diff)
downloadgdb-ed180cc5dbf8d2fe7f3eb17215badc90a8a453a9.zip
gdb-ed180cc5dbf8d2fe7f3eb17215badc90a8a453a9.tar.gz
gdb-ed180cc5dbf8d2fe7f3eb17215badc90a8a453a9.tar.bz2
* budemang.c: Delete.
* budemang.h: Delete. * addr2line.c (translate_addresses): Call bfd_demangle rather than demangle. * nm.c (print_symname): Likewise. * objdump.c (objdump_print_symname, dump_symbols): Likewise. (dump_bfd): Likewise. * prdbg.c (struct pr_handle <demangler>): Add int param. (tg_variable, tg_start_function): Adjust demangler calls. * Makefile.am: Remove mention of budemang.[ch]. Run "make dep-am". * Makefile.in: Regenerate. * po/POTFILES.in: Regenerate.
Diffstat (limited to 'binutils/nm.c')
-rw-r--r--binutils/nm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/binutils/nm.c b/binutils/nm.c
index 5d43005..59230f1 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -23,7 +23,6 @@
#include "bfd.h"
#include "progress.h"
#include "bucomm.h"
-#include "budemang.h"
#include "getopt.h"
#include "aout/stab_gnu.h"
#include "aout/ranlib.h"
@@ -335,11 +334,14 @@ print_symname (const char *format, const char *name, bfd *abfd)
{
if (do_demangle && *name)
{
- char *res = demangle (abfd, name);
+ char *res = bfd_demangle (abfd, name, DMGL_ANSI | DMGL_PARAMS);
- printf (format, res);
- free (res);
- return;
+ if (res != NULL)
+ {
+ printf (format, res);
+ free (res);
+ return;
+ }
}
printf (format, name);