This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 04/24] Make check_for_argument skip whitespace after arg itself
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 4 Jun 2019 23:21:27 +0100
- Subject: Re: [PATCH v2 04/24] Make check_for_argument skip whitespace after arg itself
- References: <20190530195333.20448-1-palves@redhat.com> <20190530195333.20448-5-palves@redhat.com> <87h896mrmp.fsf@tromey.com>
On 6/3/19 7:49 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
> Pedro> Basically every caller of check_for_argument needs to skip space after
> Pedro> the argument. This patch makes check_for_argument do it itself.
>
> Pedro> Suggested by Philippe Waroquiers
>
> Philippe's recent help-styling series added a new instance of this, so
> whoever lands their series last ought to be sure to go fix that up.
His series is in, so I made this change:
diff --git i/gdb/cli/cli-cmds.c w/gdb/cli/cli-cmds.c
index 09f932c2d21..4e33e3e3b72 100644
--- i/gdb/cli/cli-cmds.c
+++ w/gdb/cli/cli-cmds.c
@@ -1381,9 +1381,6 @@ apropos_command (const char *arg, int from_tty)
{
bool verbose = arg && check_for_argument (&arg, "-v", 2);
- if (verbose)
- arg = skip_spaces (arg);
-
if (arg == NULL || *arg == '\0')
error (_("REGEXP string is empty"));
Thanks,
Pedro Alves