From cbba3ecd36f0f861e4e810fbd5415c9759080cdc Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 13 Jun 2019 00:06:52 +0100 Subject: Make check_for_argument skip whitespace after arg itself Basically every caller of check_for_argument needs to skip space after the argument. This patch makes check_for_argument do it itself. Suggested by Philippe Waroquiers. gdb/ChangeLog: 2019-06-13 Pedro Alves * ax-gdb.c (agent_command_1): Remove skip_spaces call. * breakpoint.c (watch_maybe_just_location): Remove skip_spaces call. * cli/cli-cmds.c (apropos_command): Remove skip_spaces call. * cli/cli-utils.c (extract_info_print_args): Remove skip_spaces calls. (check_for_argument): Skip spaces after argument. --- gdb/ax-gdb.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'gdb/ax-gdb.c') diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index 778e895..5872bec 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -2634,8 +2634,6 @@ agent_command_1 (const char *exp, int eval) { struct linespec_result canonical; - exp = skip_spaces (exp); - event_location_up location = new_linespec_location (&exp, symbol_name_match_type::WILD); decode_line_full (location.get (), DECODE_LINE_FUNFIRSTLINE, NULL, -- cgit v1.1