* corefile.c (core_sym_class): Fix handling of subprogram names
authorNick Clifton <nickc@redhat.com>
Fri, 16 Jul 2010 14:52:15 +0000 (14:52 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 16 Jul 2010 14:52:15 +0000 (14:52 +0000)
        and add support for cloned function names.

gprof/ChangeLog
gprof/corefile.c

index 347ac07f3e0117654d984be0f9e89f497e98537e..91483bf2ae7ad9f8b60d37b6720e39a61f357f24 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-16  James Blackburn  <james.blackburn@broadcom.com>
+
+       * corefile.c (core_sym_class): Fix handling of subprogram names
+       and add support for cloned function names.
+
 2010-06-15  Doug Semler  <dougsemler@gmail.com>
 
        * gmon_io.c (gmon_out_read): Remove double fclose of input file.
index b2697f832ec99d2a38d01625c05457b5738441bd..6b10d177488d28a1e57e660c0554cde55a5eaf66 100644 (file)
@@ -385,12 +385,20 @@ core_sym_class (asymbol *sym)
       if (*name == '$')
         return 0;
 
-      /* Do not discard nested subprograms (those
-        which end with .NNN, where N are digits).  */
       if (*name == '.')
-       for (name++; *name; name++)
-         if (! ISDIGIT (*name))
-           return 0;
+       {
+         /* Allow GCC cloned functions.  */
+         if (strlen (name) > 7 && strncmp (name, ".clone.", 7) == 0)
+           name += 6;
+
+         /* Do not discard nested subprograms (those
+            which end with .NNN, where N are digits).  */
+         for (name++; *name; name++)
+           if (! ISDIGIT (*name))
+             return 0;
+
+         break;
+       }
     }
 
   /* On systems where the C compiler adds an underscore to all
This page took 0.024277 seconds and 4 git commands to generate.