diff options
author | Alan Modra <amodra@gmail.com> | 2007-04-19 10:43:47 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-04-19 10:43:47 +0000 |
commit | ed180cc5dbf8d2fe7f3eb17215badc90a8a453a9 (patch) | |
tree | af2edb74e47e3096c253376babbb73f849d0481b /binutils/objdump.c | |
parent | 01e76792975830272df446256851f586a58cf1a9 (diff) | |
download | gdb-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/objdump.c')
-rw-r--r-- | binutils/objdump.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c index 0177b99..7e58cb6 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)); |