Author: gber Date: Fri May 25 06:48:42 2012 New Revision: 235975 URL: http://svn.freebsd.org/changeset/base/235975
Log: Fix resolving symbol names on ARM. On ARM, binutils are adding '$a' symbols in the symbol table for every function (in addition to normal symbol). When gprof(1) looks up symbol name, it often reads '$a' instead of proper function name, because it find it first. With this fix, when read symbol name begins with '$' and previous symbol has the same address, it will use previous symbol name (which is proper function name). Obtained from: Semihalf Modified: head/usr.bin/gprof/lookup.c Modified: head/usr.bin/gprof/lookup.c ============================================================================== --- head/usr.bin/gprof/lookup.c Fri May 25 06:41:08 2012 (r235974) +++ head/usr.bin/gprof/lookup.c Fri May 25 06:48:42 2012 (r235975) @@ -66,6 +66,12 @@ nllookup( address ) printf( "[nllookup] %d (%d) probes\n" , probes , nname-1 ); } # endif /* DEBUG */ +#if defined(__arm__) + if (nl[middle].name[0] == '$' && + nl[middle-1].value == nl[middle].value) + middle--; +#endif + return &nl[ middle ]; } if ( nl[ middle ].value > address ) { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"