diff options
author | Nick Clifton <nickc@redhat.com> | 2007-07-05 09:07:30 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-07-05 09:07:30 +0000 |
commit | b0e184a088ce4d78cae4878cc843661f1773bcb2 (patch) | |
tree | d21b1fd07a2ba5bb77903abf0da5864af1d5f7bf /gprof/corefile.c | |
parent | dc09331d71b65fd64a3e0585ea936858a0c51a5c (diff) | |
download | binutils-redhat-b0e184a088ce4d78cae4878cc843661f1773bcb2.tar.gz |
* corefile.c (core_sym_class): Do not discard nested subprograms.
Diffstat (limited to 'gprof/corefile.c')
-rw-r--r-- | gprof/corefile.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gprof/corefile.c b/gprof/corefile.c index a078d61c89..a9f1f6c93f 100644 --- a/gprof/corefile.c +++ b/gprof/corefile.c @@ -1,6 +1,6 @@ /* corefile.c - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -27,6 +27,7 @@ #include "symtab.h" #include "hist.h" #include "corefile.h" +#include "safe-ctype.h" bfd *core_bfd; static int core_num_syms; @@ -365,8 +366,15 @@ core_sym_class (asymbol *sym) for (name = sym->name; *name; ++name) { - if (*name == '.' || *name == '$') - return 0; + 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; } /* On systems where the C compiler adds an underscore to all |