aboutsummaryrefslogtreecommitdiff
path: root/gdb/interps.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/interps.c')
-rw-r--r--gdb/interps.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/gdb/interps.c b/gdb/interps.c
index 3bb7811..73bc51c 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -371,20 +371,15 @@ interpreter_exec_cmd (char *args, int from_tty)
unsigned int i;
int old_quiet, use_quiet;
- prules = buildargv (args);
- if (prules == NULL)
- {
- error (_("unable to parse arguments"));
- }
+ if (args == NULL)
+ error_no_arg (_("interpreter-exec command"));
+
+ prules = gdb_buildargv (args);
+ make_cleanup_freeargv (prules);
nrules = 0;
- if (prules != NULL)
- {
- for (trule = prules; *trule != NULL; trule++)
- {
- nrules++;
- }
- }
+ for (trule = prules; *trule != NULL; trule++)
+ nrules++;
if (nrules < 2)
error (_("usage: interpreter-exec <interpreter> [ <command> ... ]"));