2010-03-25 Doug Kwan <dougkwan@google.com>
[deliverable/binutils-gdb.git] / gprof / utils.c
index 146e1f376c6611daf3427cd8e6525738f9b56a71..f34984108e530581bfac47013d04b3cedd63baf6 100644 (file)
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-#include "demangle.h"
 #include "gprof.h"
+#include "demangle.h"
 #include "search_list.h"
 #include "source.h"
 #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);
This page took 0.024012 seconds and 4 git commands to generate.