PR breakpoint/12803
* linespec.c (keep_name_info): Add handling for "volatile" keyword. (decode_compound): Unconditionally call keep_name_info.
This commit is contained in:
parent
c8fa16ed5a
commit
f17170e5e2
@ -1,3 +1,9 @@
|
|||||||
|
2011-05-24 Keith Seitz <keiths@redhat.com>
|
||||||
|
|
||||||
|
PR breakpoint/12803
|
||||||
|
* linespec.c (keep_name_info): Add handling for "volatile" keyword.
|
||||||
|
(decode_compound): Unconditionally call keep_name_info.
|
||||||
|
|
||||||
2011-05-24 Pedro Alves <pedro@codesourcery.com>
|
2011-05-24 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
* breakpoint.c (watchpoint_check): If the watchpoint went out of
|
* breakpoint.c (watchpoint_check): If the watchpoint went out of
|
||||||
|
@ -715,8 +715,7 @@ keep_name_info (char *ptr)
|
|||||||
if (name_end (ptr))
|
if (name_end (ptr))
|
||||||
return remove_trailing_whitespace (start, ptr);
|
return remove_trailing_whitespace (start, ptr);
|
||||||
|
|
||||||
while (isspace (*p))
|
p = skip_spaces (p);
|
||||||
++p;
|
|
||||||
if (*p == '<')
|
if (*p == '<')
|
||||||
ptr = p = find_template_name_end (ptr);
|
ptr = p = find_template_name_end (ptr);
|
||||||
|
|
||||||
@ -731,12 +730,21 @@ keep_name_info (char *ptr)
|
|||||||
return remove_trailing_whitespace (start, ptr);
|
return remove_trailing_whitespace (start, ptr);
|
||||||
|
|
||||||
/* Keep important keywords. */
|
/* Keep important keywords. */
|
||||||
while (isspace (*p))
|
while (1)
|
||||||
++p;
|
{
|
||||||
if (strncmp (p, "const", 5) == 0
|
char *quotes = get_gdb_completer_quote_characters ();
|
||||||
&& (isspace (p[5]) || p[5] == '\0'
|
p = skip_spaces (p);
|
||||||
|| strchr (get_gdb_completer_quote_characters (), p[5]) != NULL))
|
if (strncmp (p, "const", 5) == 0
|
||||||
ptr = p = p + 5;
|
&& (isspace (p[5]) || p[5] == '\0'
|
||||||
|
|| strchr (quotes, p[5]) != NULL))
|
||||||
|
ptr = p = p + 5;
|
||||||
|
else if (strncmp (p, "volatile", 8) == 0
|
||||||
|
&& (isspace (p[8]) || p[8] == '\0'
|
||||||
|
|| strchr (quotes, p[8]) != NULL))
|
||||||
|
ptr = p = p + 8;
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return remove_trailing_whitespace (start, ptr);
|
return remove_trailing_whitespace (start, ptr);
|
||||||
}
|
}
|
||||||
@ -1574,9 +1582,7 @@ decode_compound (char **argptr, int funfirstline,
|
|||||||
/* We couldn't find a class, so we're in case 2 above. We check the
|
/* We couldn't find a class, so we're in case 2 above. We check the
|
||||||
entire name as a symbol instead. */
|
entire name as a symbol instead. */
|
||||||
|
|
||||||
if (current_language->la_language == language_cplus
|
p = keep_name_info (p);
|
||||||
|| current_language->la_language == language_java)
|
|
||||||
p = keep_name_info (p);
|
|
||||||
|
|
||||||
copy = (char *) alloca (p - saved_arg2 + 1);
|
copy = (char *) alloca (p - saved_arg2 + 1);
|
||||||
memcpy (copy, saved_arg2, p - saved_arg2);
|
memcpy (copy, saved_arg2, p - saved_arg2);
|
||||||
|
Loading…
Reference in New Issue
Block a user