From: Nicholas Nethercote Date: Sat, 26 Mar 2005 16:10:49 +0000 (+0000) Subject: Skip a stab if it has no ':' at all. X-Git-Tag: svn/VALGRIND_3_0_0~873 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23f4ba44cd4bf118c8fe7e6b014e693e24de046c;p=thirdparty%2Fvalgrind.git Skip a stab if it has no ':' at all. MERGED FROM CVS HEAD git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3445 --- diff --git a/coregrind/vg_stabs.c b/coregrind/vg_stabs.c index 7c10861155..9171f37f8d 100644 --- a/coregrind/vg_stabs.c +++ b/coregrind/vg_stabs.c @@ -1028,8 +1028,18 @@ static Bool initSym(SegInfo *si, Sym *sym, stab_types kind, Char **namep, Int va VG_(printf)("initSym(si=%p, tab=%p, sym=%p, kind=%d, name=%p \"%s\", val=%d)\n", si, si->stab_typetab, sym, kind, name, name, val); + /* First first ':' */ ty = VG_(strchr)(name, ':'); - while (ty && ty[1] == ':') ty = VG_(strchr)(ty + 2, ':'); + + /* Skip '::' */ + while (ty && ty[1] == ':') + ty = VG_(strchr)(ty + 2, ':'); + + if (ty == NULL) { + /* there was no ':' */ + *namep += VG_(strlen)(name); + return True; /* skip */ + } len = ty - name;