aboutsummaryrefslogtreecommitdiff
path: root/gprof/gprof.c
diff options
context:
space:
mode:
authorSean Eric Fagan <sef@cygnus>1991-07-22 20:35:30 +0000
committerSean Eric Fagan <sef@cygnus>1991-07-22 20:35:30 +0000
commit5f630bb0e2205cee2a34d4259d761a9830362e9b (patch)
tree6dd42c22020ab3f37d58e4c7eb2a9f4c7181885f /gprof/gprof.c
parent811e3c6a86b2cf067b6ed07dfae8559c6d1aaabf (diff)
downloadgdb-5f630bb0e2205cee2a34d4259d761a9830362e9b.zip
gdb-5f630bb0e2205cee2a34d4259d761a9830362e9b.tar.gz
gdb-5f630bb0e2205cee2a34d4259d761a9830362e9b.tar.bz2
Put in a check to make sure symbols have names; if there is no name, then
the symbol is not a function (I assume).
Diffstat (limited to 'gprof/gprof.c')
-rw-r--r--gprof/gprof.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gprof/gprof.c b/gprof/gprof.c
index 9cf6447..94f7f98 100644
--- a/gprof/gprof.c
+++ b/gprof/gprof.c
@@ -688,6 +688,9 @@ funcsymbol( symp )
* where `funny' includes `.', .o file names
* and `$', pascal labels.
*/
+ if (!symp->name)
+ return FALSE;
+
for (name = symp->name; *name; name++) {
if ( *name == '.' || *name == '$' ) {
return FALSE;