aboutsummaryrefslogtreecommitdiff
path: root/gprof/utils.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-04-19 10:46:56 +0000
committerAlan Modra <amodra@gmail.com>2007-04-19 10:46:56 +0000
commit8db406db3cc6d3458f34df478aab371896401d5e (patch)
tree32222877bc8555bcec82b512d7ce2672b7795c05 /gprof/utils.c
parent73705ac309d244b61d3b372d61e867c05d8ea2a8 (diff)
downloadgdb-8db406db3cc6d3458f34df478aab371896401d5e.zip
gdb-8db406db3cc6d3458f34df478aab371896401d5e.tar.gz
gdb-8db406db3cc6d3458f34df478aab371896401d5e.tar.bz2
* corefile.c (core_create_function_syms, core_create_line_syms): Don't
set discard_underscores. * gprof.c (discard_underscores): Delete. * gprof.h (discard_underscores): Delete. * sym_ids.c (match): Use bfd_get_symbol_leading_char to check for leading underscores. * utils.c (print_name_only): Call bfd_demangle rather than cplus_demangle. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate.
Diffstat (limited to 'gprof/utils.c')
-rw-r--r--gprof/utils.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/gprof/utils.c b/gprof/utils.c
index 146e1f3..cf79fd6 100644
--- a/gprof/utils.c
+++ b/gprof/utils.c
@@ -33,6 +33,7 @@
#include "symtab.h"
#include "cg_arcs.h"
#include "utils.h"
+#include "corefile.h"
/*
@@ -49,20 +50,11 @@ print_name_only (Sym *self)
if (name)
{
- if (!bsd_style_output)
+ if (!bsd_style_output && demangle)
{
- if (name[0] == '_' && name[1] && discard_underscores)
- {
- name++;
- }
- if (demangle)
- {
- demangled = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS);
- if (demangled)
- {
- name = demangled;
- }
- }
+ demangled = bfd_demangle (core_bfd, name, DMGL_ANSI | DMGL_PARAMS);
+ if (demangled)
+ name = demangled;
}
printf ("%s", name);
size = strlen (name);