+2002-05-09 Elena Zannoni <ezannoni@redhat.com>
+
+ From Daniel Berlin <dan@cgsoftware.com>
+ * linespec.c (find_toplevel_char): '<' and '>' also increase and
+ decrease the depth we are at, in the case of templates.
+
2002-05-09 Daniel Jacobowitz <drow@mvista.com>
* mips-tdep.c (mips_float_register_type): New function.
/* Find an instance of the character C in the string S that is outside
of all parenthesis pairs, single-quoted strings, and double-quoted
- strings. */
+ strings. Also, ignore the char within a template name, like a ','
+ within foo<int, int>. */
+
static char *
find_toplevel_char (char *s, char c)
{
return scan;
else if (*scan == '"' || *scan == '\'')
quoted = *scan;
- else if (*scan == '(')
+ else if (*scan == '(' || *scan == '<')
depth++;
- else if (*scan == ')' && depth > 0)
+ else if ((*scan == ')' || *scan == '>') && depth > 0)
depth--;
}