[Patch] gprof: accept nested subprograms
Tristan Gingold
gingold@adacore.com
Wed Jul 4 14:46:00 GMT 2007
Hi,
nested subprograms are considered as not interesting and do not
appear in results. I think this is quiet annoying.
This patch fixes the issue.
Tristan.
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 14:39:25 -0000
*************** 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
--- 365,380 ----
for (name = sym->name; *name; ++name)
{
! if (*name == '$')
return 0;
+ /* Do not discard nested subprograms (those which finishes
with .NNN,
+ where N are digits. */
+ if (*name == '.')
+ {
+ for (name++; *name; name++)
+ if (*name < '0' || *name > '9')
+ return 0;
+ }
}
/* On systems where the C compiler adds an underscore to all
More information about the Binutils
mailing list