This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] gprof: accept nested subprograms


Updated version (thank you for pointing out typos)

gprof/ChangeLog:
2007-07-04  Tristan Gingold  <gingold@adacore.com>

* corefile.c (core_sym_class): Do not discard nested subprograms.


*** gprof/corefile.c 19 Apr 2007 10:46:56 -0000 1.27 --- gprof/corefile.c 4 Jul 2007 15:28:16 -0000 *************** *** 20,25 **** --- 20,26 ---- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */


+ #include <ctype.h> #include "libiberty.h" #include "gprof.h" #include "search_list.h" *************** core_sym_class (asymbol *sym) *** 365,372 ****

    for (name = sym->name; *name; ++name)
      {
!       if (*name == '.' || *name == '$')
        return 0;
      }

    /* On systems where the C compiler adds an underscore to all
--- 366,381 ----

    for (name = sym->name; *name; ++name)
      {
!       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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]