This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 04/24] Make check_for_argument skip whitespace after arg itself


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]