summaryrefslogtreecommitdiff
path: root/gprof
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-07-16 14:52:15 +0000
committerNick Clifton <nickc@redhat.com>2010-07-16 14:52:15 +0000
commit183e4ed8bc23eb5396b66e6d4a6167baa429f94d (patch)
treef269825bba7bafd8d85537165886af808cb5b95a /gprof
parent4e92bb1cd7758c6e95be333ec3efd41baec318dc (diff)
downloadbinutils-183e4ed8bc23eb5396b66e6d4a6167baa429f94d.tar.gz
binutils-183e4ed8bc23eb5396b66e6d4a6167baa429f94d.tar.bz2
binutils-183e4ed8bc23eb5396b66e6d4a6167baa429f94d.zip
* corefile.c (core_sym_class): Fix handling of subprogram names
and add support for cloned function names.
Diffstat (limited to 'gprof')
-rw-r--r--gprof/ChangeLog5
-rw-r--r--gprof/corefile.c18
2 files changed, 18 insertions, 5 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog
index 347ac07f3e0..91483bf2ae7 100644
--- a/gprof/ChangeLog
+++ b/gprof/ChangeLog
@@ -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.
diff --git a/gprof/corefile.c b/gprof/corefile.c
index b2697f832ec..6b10d177488 100644
--- a/gprof/corefile.c
+++ b/gprof/corefile.c
@@ -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