From 43ab5f387738dff8a65a1d15d764b7fc18447f89 Mon Sep 17 00:00:00 2001 From: John Polstra Date: Sat, 8 Aug 1998 17:48:26 +0000 Subject: [PATCH] Don't ignore symbols containing "$". C++ destructors and other special functions have names containing dollar signs, and ignoring them causes gprof to produce incorrect and sometimes bizarre results. The comment in the original code said that dollar signs were excluded because they are used in Pascal labels. That's not much of an issue these days. --- usr.bin/gprof/gprof.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/usr.bin/gprof/gprof.c b/usr.bin/gprof/gprof.c index 6ad996293ff..185e2c620b6 100644 --- a/usr.bin/gprof/gprof.c +++ b/usr.bin/gprof/gprof.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)gprof.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: gprof.c,v 1.5 1997/07/10 06:45:00 charnier Exp $"; + "$Id: gprof.c,v 1.6 1997/07/15 08:04:40 charnier Exp $"; #endif /* not lint */ #include @@ -728,8 +728,7 @@ funcsymbol( nlistp ) /* * name must start with an underscore if uflag is set. * can't have any `funny' characters in name, - * where `funny' includes `.', .o file names - * and `$', pascal labels. + * where `funny' means `.' (.o file names) * need to make an exception for sparc .mul & co. * perhaps we should just drop this code entirely... */ @@ -747,7 +746,7 @@ funcsymbol( nlistp ) } #endif while ( c = *name++ ) { - if ( c == '.' || c == '$' ) { + if ( c == '.' ) { return FALSE; } }