diff options
author | Keith Seitz <keiths@redhat.com> | 2013-03-07 21:57:30 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2013-03-07 21:57:30 +0000 |
commit | 529480d058a17512a1cff27c682d340f8ea3ab33 (patch) | |
tree | 6e7dbc25ce944d5dfc4ab5f99a1fa2b3859aa07a /gdb/mi | |
parent | be05d20139d4e0a0ce374465d2d287af6f13c980 (diff) | |
download | gdb-529480d058a17512a1cff27c682d340f8ea3ab33.zip gdb-529480d058a17512a1cff27c682d340f8ea3ab33.tar.gz gdb-529480d058a17512a1cff27c682d340f8ea3ab33.tar.bz2 |
* breakpoint.c (catch_syscall_split_args): Use skip_spaces.
(trace_pass_command): Likewise.
* cli/cli-cmds.c: Include cli/cli-utils.h.
(source_command): Use skip-spaces.
(disassemble_command): Likewise.
* findcmd.c: Include cli/cli-utils.h.
(parse_find_args): Use skip_spaces.
* go32-nat.c: Include cli/cli-utils.h.
(go32_sldt): Use skip_spaces.
(go32_sgdt): Likewise.
(go32_sidt): Likewise.
(go32_pde): Likewise.
(go32_pte): Likewise.
(go32_pte_for_address): Likewise.
* infcmd.c: Include cli/cli-utils.h.
(registers_info): Use skip_spaces.
* linux-tdep.c (read_mapping): Use skip_spaces_const.
(linux_info_proc): Likewise.
* linux-thread-db.c: Include cli/cli-utils.h.
(info_auto_load_libthread_db): Use skip_spaces_const.
* m32r-rom.c: Include cli/cli-utils.h.
(m32r_upload_command): Use skip_spaces.
* maint.c: Include cli/cli-utils.h.
(maintenance_translate_address): Use skip_spaces.
* mi/mi-parse.c: Include cli/cli-utils.h.
(mi_parse_argv): Use skip_spaces.
(mi_parse): Likewise.
* minsyms.c: Include cli/cli-utils.h.
(msymbol_hash_iw): Use skip_spaces_const.
* objc-lang.c: Include cli/cli-utils.h.
(parse_selector): Use skip_spaces.
(parse_method): Likewise.
* python/python.c: Include cli/cli-utils.h.
(python_interactive_command)[HAVE_PYTHON]: Use skip_spaces.
(python_command)[HAVE_PYTHON]: Likewise.
(python_interactive_command)[!HAVE_PYTHON]: Likewise.
* remote-m32r-sdi.c: Include cli/cli-utils.h.
(m32r_load): Use skip_spaces.
* serial.c: Include cli/cli-utils.h.
(serial_open): Use skip_spaces_const.
* stack.c: Include cli/cli-utils.h.
(parse_frame_specification_1): Use skip_spaces_const.
* symfile.c: Include cli/cli-utils.h.
(set_ext_lang_command): Use skip_spaces.
* symtab.c: Include cli/cli-utils.h.
(rbreak_command): Use skip_spaces.
* thread.c (thread_name_command): Use skip_spaces.
* tracepoint.c (validate_actionline): Use skip_spaces.
(encode_actions_1): Likewise.
(trace_find_range_command): Likewise.
(trace_find_outside_command): Likewise.
(trace_dump_actions): Likewise.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-parse.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gdb/mi/mi-parse.c b/gdb/mi/mi-parse.c index 265d99f..407869d 100644 --- a/gdb/mi/mi-parse.c +++ b/gdb/mi/mi-parse.c @@ -26,6 +26,7 @@ #include <ctype.h> #include "gdb_string.h" +#include "cli/cli-utils.h" /* Like parse_escape, but leave the results as a host char, not a target char. */ @@ -114,8 +115,7 @@ mi_parse_argv (char *args, struct mi_parse *parse) char *arg; /* Skip leading white space. */ - while (isspace (*chp)) - chp++; + chp = skip_spaces (chp); /* Three possibilities: EOF, quoted string, or other text. */ switch (*chp) { @@ -244,8 +244,7 @@ mi_parse (char *cmd, char **token) cleanup = make_cleanup (mi_parse_cleanup, parse); /* Before starting, skip leading white space. */ - while (isspace (*cmd)) - cmd++; + cmd = skip_spaces (cmd); /* Find/skip any token and then extract it. */ for (chp = cmd; *chp >= '0' && *chp <= '9'; chp++) @@ -257,8 +256,7 @@ mi_parse (char *cmd, char **token) /* This wasn't a real MI command. Return it as a CLI_COMMAND. */ if (*chp != '-') { - while (isspace (*chp)) - chp++; + chp = skip_spaces (chp); parse->command = xstrdup (chp); parse->op = CLI_COMMAND; @@ -284,8 +282,7 @@ mi_parse (char *cmd, char **token) error (_("Undefined MI command: %s"), parse->command); /* Skip white space following the command. */ - while (isspace (*chp)) - chp++; + chp = skip_spaces (chp); /* Parse the --thread and --frame options, if present. At present, some important commands, like '-break-*' are implemented by @@ -343,8 +340,7 @@ mi_parse (char *cmd, char **token) if (*chp != '\0' && !isspace (*chp)) error (_("Invalid value for the '%s' option"), option); - while (isspace (*chp)) - chp++; + chp = skip_spaces (chp); } /* For new argv commands, attempt to return the parsed argument |