]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Skip a stab if it has no ':' at all.
authorNicholas Nethercote <njn@valgrind.org>
Sat, 26 Mar 2005 16:10:49 +0000 (16:10 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Sat, 26 Mar 2005 16:10:49 +0000 (16:10 +0000)
MERGED FROM CVS HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3445

coregrind/vg_stabs.c

index 7c10861155335393bcb352d87835d2b35dcf6978..9171f37f8d46c5a2797602c2b30ce238ca8f65d9 100644 (file)
@@ -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;