Define SKIP_ZEROES as 32 for tic4x target in order to ensure proper
[deliverable/binutils-gdb.git] / binutils / nm.c
index f97732e0e231157ee8014090c4dfc1cce4a89a2e..62bc2b46198e20b48f96e7fe9cc0f4b6f94fda84 100644 (file)
@@ -23,6 +23,7 @@
 #include "bfd.h"
 #include "progress.h"
 #include "bucomm.h"
+#include "budemang.h"
 #include "getopt.h"
 #include "aout/stab_gnu.h"
 #include "aout/ranlib.h"
@@ -250,7 +251,7 @@ usage (stream, status)
   -B                     Same as --format=bsd\n\
   -C, --demangle[=STYLE] Decode low-level symbol names into user-level names\n\
                           The STYLE, if specified, can be `auto' (the default),\n\
-                          `gnu', 'lucid', 'arm', 'hp', 'edg' or 'gnu-new-abi'\n\
+                          `gnu', 'lucid', 'arm', 'hp', 'edg' or 'gnu-v3'\n\
       --no-demangle      Do not demangle low-level symbol names\n\
   -D, --dynamic          Display dynamic symbols instead of normal symbols\n\
       --defined-only     Display only defined symbols\n\
@@ -1085,43 +1086,11 @@ print_symname (format, name, abfd)
 {
   if (do_demangle && *name)
     {
-      char *res;
-      const char *p;
-
-      /* In this mode, give a user-level view of the symbol name
-        even if it's not mangled; strip off any leading
-        underscore.  */
-      if (bfd_get_symbol_leading_char (abfd) == name[0])
-       name++;
-
-      /* This is a hack for XCOFF, PowerPC64-ELF or the MS PE format.
-        These formats have a number of leading '.'s on at least some
-        symbols, so we remove all dots to avoid confusing the
-        demangler.  */
-      p = name;
-      while (*p == '.')
-       ++p;
-
-      res = cplus_demangle (p, DMGL_ANSI | DMGL_PARAMS);
-      if (res)
-       {
-         size_t dots = p - name;
-
-         /* Now put back any stripped dots.  */
-         if (dots != 0)
-           {
-             size_t len = strlen (res) + 1;
-             char *add_dots = xmalloc (len + dots);
+      char *res = demangle (abfd, name);
 
-             memcpy (add_dots, name, dots);
-             memcpy (add_dots + dots, res, len);
-             free (res);
-             res = add_dots;
-           }
-         printf (format, res);
-         free (res);
-         return;
-       }
+      printf (format, res);
+      free (res);
+      return;
     }
 
   printf (format, name);
This page took 0.023584 seconds and 4 git commands to generate.