mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-07 20:50:56 +00:00
This fixes bug 75614. It seems that a symbol can be named
"foo<bar::blat>"; normally stabs names are terminated by ':', but we also need to keep track of <> pairs so we can ignore nested colons. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2267
This commit is contained in:
parent
d03690c430
commit
aa80b6dcf0
@ -775,9 +775,26 @@ static SymType *stabtype_parser(SegInfo *si, SymType *def, Char **pp)
|
||||
Char *name;
|
||||
UInt off, sz;
|
||||
SymType *fieldty;
|
||||
Int templ=0;
|
||||
|
||||
/* Skip past field name, which ends with ':' or '::' - but
|
||||
'::' can appear within a template-mangled name, so keep
|
||||
track of '<' and '>'. */
|
||||
end = p;
|
||||
while(*end) {
|
||||
Char ch = *end++;
|
||||
|
||||
if (ch == '<')
|
||||
templ++;
|
||||
else if (ch == '>')
|
||||
templ--;
|
||||
else if (templ == 0 && ch == ':') {
|
||||
end--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* XXX check for *end != ':' */
|
||||
|
||||
end = SKIPPAST(p, ':', "struct/union field NAME");
|
||||
end--; /* want to point to (first) ':' */
|
||||
if (end[1] == ':') {
|
||||
/* c++ method names end in :: */
|
||||
method = True;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user