diff options
Diffstat (limited to 'gdb/cli/cli-cmds.c')
-rw-r--r-- | gdb/cli/cli-cmds.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 680cf99..0d37d57 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -47,6 +47,7 @@ #include "cli/cli-script.h" #include "cli/cli-setshow.h" #include "cli/cli-cmds.h" +#include "cli/cli-utils.h" #include "python/python.h" @@ -624,8 +625,7 @@ source_command (char *args, int from_tty) { /* Make sure leading white space does not break the comparisons. */ - while (isspace(args[0])) - args++; + args = skip_spaces (args); if (args[0] != '-') break; @@ -648,9 +648,7 @@ source_command (char *args, int from_tty) break; } - while (isspace (args[0])) - args++; - file = args; + file = skip_spaces (args); } source_script_with_search (file, from_tty, search_path); @@ -1141,8 +1139,7 @@ disassemble_command (char *arg, int from_tty) } } - while (isspace (*arg)) - ++arg; + arg = skip_spaces (arg); } if (! arg || ! *arg) @@ -1175,8 +1172,7 @@ disassemble_command (char *arg, int from_tty) /* Two arguments. */ int incl_flag = 0; low = pc; - while (isspace (*arg)) - arg++; + arg = skip_spaces (arg); if (arg[0] == '+') { ++arg; |