[PATCH] gdb: improve command completion for 'print', 'x', and 'display'
Pedro Alves
pedro@palves.net
Fri Nov 20 13:47:37 GMT 2020
On 11/19/20 10:14 AM, Andrew Burgess wrote:
>> Andrew> The /FMT specification on the print command currently breaks command
>> Andrew> completion, so:
>>
>> Note that this is PR cli/16256
>>
>> Andrew> + if (ISALNUM (text[1]) || ISSPACE(text[1]))
>>
>> Missing space before a paren here.
>>
>> Andrew> + {
>> Andrew> + /* Skip over the actual format specification. */
>> Andrew> + while (*text != '\0' && !ISSPACE (*text))
>> Andrew> + ++text;
>>
>> There's skip_spaces and skip_to_space for this kind of thing..
> Thanks for the suggestion. I pushed the patch below to address
> this issue.
I assumed it was on purpose that those weren't used, since you've
included safe-ctype.h and are (rightfully IMO) using ISSPACE and not
isspace. skip_spaces/skip_to_space use isspace not ISSPACE.
Probably doesn't make a difference in practice. Not sure there's
any locale where isspace/ISSPACE return a different result.
ISSPACE is cheaper, so maybe we should make skip_spaces/skip_to_space
use it.
More information about the Gdb-patches
mailing list