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 | 3289fe0ce07986d2d93e5ac8461e7fc1d43d8012 (patch) | |
tree | db86c16edf7667abba8cb9f4c7b4374ef97e5810 /gprof/corefile.c | |
parent | 29422971f1854e0b2fef00243c2924ae9f3bdecc (diff) | |
download | binutils-gdb-3289fe0ce07986d2d93e5ac8461e7fc1d43d8012.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 a078d61c893..a9f1f6c93f9 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 |