summaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2007-04-19 10:43:47 +0000
committerAlan Modra <amodra@bigpond.net.au>2007-04-19 10:43:47 +0000
commit02c77b72047a3ecb5a94c516333174dc93a7a3d3 (patch)
tree87df235bff27a4aba53fd1c3afed653eb9e7c200 /binutils/objdump.c
parent5b1cada61288596e71ca294531c3951b43358321 (diff)
downloadbinutils-redhat-02c77b72047a3ecb5a94c516333174dc93a7a3d3.tar.gz
* 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/objdump.c')
-rw-r--r--binutils/objdump.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 0177b99e5c..7e58cb61a9 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -52,7 +52,6 @@
#include "progress.h"
#include "bucomm.h"
#include "dwarf.h"
-#include "budemang.h"
#include "getopt.h"
#include "safe-ctype.h"
#include "dis-asm.h"
@@ -649,8 +648,9 @@ objdump_print_symname (bfd *abfd, struct disassemble_info *info,
if (do_demangle && name[0] != '\0')
{
/* Demangle the name. */
- alloc = demangle (abfd, name);
- name = alloc;
+ alloc = bfd_demangle (abfd, name, DMGL_ANSI | DMGL_PARAMS);
+ if (alloc != NULL)
+ name = alloc;
}
if (info != NULL)
@@ -2514,12 +2514,16 @@ dump_symbols (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean dynamic)
/* If we want to demangle the name, we demangle it
here, and temporarily clobber it while calling
bfd_print_symbol. FIXME: This is a gross hack. */
- alloc = demangle (cur_bfd, name);
- (*current)->name = alloc;
+ alloc = bfd_demangle (cur_bfd, name, DMGL_ANSI | DMGL_PARAMS);
+ if (alloc != NULL)
+ (*current)->name = alloc;
bfd_print_symbol (cur_bfd, stdout, *current,
bfd_print_symbol_all);
- (*current)->name = name;
- free (alloc);
+ if (alloc != NULL)
+ {
+ (*current)->name = name;
+ free (alloc);
+ }
}
else
bfd_print_symbol (cur_bfd, stdout, *current,
@@ -2825,8 +2829,9 @@ dump_bfd (bfd *abfd)
dhandle = read_debugging_info (abfd, syms, symcount);
if (dhandle != NULL)
{
- if (! print_debugging_info (stdout, dhandle, abfd, syms, demangle,
- dump_debugging_tags ? TRUE : FALSE))
+ if (!print_debugging_info (stdout, dhandle, abfd, syms,
+ bfd_demangle,
+ dump_debugging_tags ? TRUE : FALSE))
{
non_fatal (_("%s: printing debugging information failed"),
bfd_get_filename (abfd));