+2019-06-13  Pedro Alves <palves@redhat.com>
+
+       * 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.
+
 2019-06-13  Pedro Alves  <palves@redhat.com>
 
        * thread.c (thread_apply_command): Adjust TID parsing.
 
     {
       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,
 
   if (arg
       && (check_for_argument (&arg, "-location", sizeof ("-location") - 1)
          || check_for_argument (&arg, "-l", sizeof ("-l") - 1)))
-    {
-      arg = skip_spaces (arg);
-      just_location = 1;
-    }
+    just_location = 1;
 
   watch_command_1 (arg, accessflag, from_tty, just_location, 0);
 }
 
 {
   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"));
 
 
   /* Check for NAMEREGEXP or -- NAMEREGEXP.  */
   if (**args != '-' || check_for_argument (args, "--", 2))
     {
-      *args = skip_spaces (*args);
       *regexp = *args;
       *args = NULL;
       return true;
   if (check_for_argument (args, "-q", 2))
     {
       *quiet = true;
-      *args = skip_spaces (*args);
       return true;
     }
 
       && ((*str)[arg_len] == '\0' || isspace ((*str)[arg_len])))
     {
       *str += arg_len;
+      *str = skip_spaces (*str);
       return 1;
     }
   return 0;
 
 /* A helper function that looks for an argument at the start of a
    string.  The argument must also either be at the end of the string,
    or be followed by whitespace.  Returns 1 if it finds the argument,
-   0 otherwise.  If the argument is found, it updates *STR.  */
+   0 otherwise.  If the argument is found, it updates *STR to point
+   past the argument and past any whitespace following the
+   argument.  */
 extern int check_for_argument (const char **str, const char *arg, int arg_len);
 
 /* Same, for non-const STR.  */