struct mi_cmd mi_cmds[] =
{
- { "break-after", { "ignore", 1 }, NULL, NULL },
- { "break-catch", { NULL, 0 }, NULL, NULL },
- { "break-commands", { NULL, 0 }, NULL, NULL },
- { "break-condition", { "cond", 1 }, NULL, NULL },
- { "break-delete", { "delete breakpoint", 1 }, NULL, NULL },
- { "break-disable", { "disable breakpoint", 1 }, NULL, NULL },
- { "break-enable", { "enable breakpoint", 1 }, NULL, NULL },
- { "break-info", { "info break", 1 }, NULL, NULL },
- { "break-insert", { NULL, 0 }, 0, mi_cmd_break_insert},
- { "break-list", { "info break", }, NULL, NULL },
- { "break-watch", { NULL, 0 }, 0, mi_cmd_break_watch},
- { "data-disassemble", { NULL, 0 }, 0, mi_cmd_disassemble},
- { "data-evaluate-expression", { NULL, 0 }, 0, mi_cmd_data_evaluate_expression},
- { "data-list-changed-registers", { NULL, 0 }, 0, mi_cmd_data_list_changed_registers},
- { "data-list-register-names", { NULL, 0 }, 0, mi_cmd_data_list_register_names},
- { "data-list-register-values", { NULL, 0 }, 0, mi_cmd_data_list_register_values},
- { "data-read-memory", { NULL, 0 }, 0, mi_cmd_data_read_memory},
- { "data-write-memory", { NULL, 0 }, 0, mi_cmd_data_write_memory},
- { "data-write-register-values", { NULL, 0 }, 0, mi_cmd_data_write_register_values},
- { "enable-timings", { NULL, 0 }, 0, mi_cmd_enable_timings},
- { "environment-cd", { NULL, 0 }, 0, mi_cmd_env_cd},
- { "environment-directory", { NULL, 0 }, 0, mi_cmd_env_dir},
- { "environment-path", { NULL, 0 }, 0, mi_cmd_env_path},
- { "environment-pwd", { NULL, 0 }, 0, mi_cmd_env_pwd},
- { "exec-abort", { NULL, 0 }, NULL, NULL },
- { "exec-arguments", { "set args", 1 }, NULL, NULL },
+ { "break-after", { "ignore", 1 }, NULL },
+ { "break-catch", { NULL, 0 }, NULL },
+ { "break-commands", { NULL, 0 }, NULL },
+ { "break-condition", { "cond", 1 }, NULL },
+ { "break-delete", { "delete breakpoint", 1 }, NULL },
+ { "break-disable", { "disable breakpoint", 1 }, NULL },
+ { "break-enable", { "enable breakpoint", 1 }, NULL },
+ { "break-info", { "info break", 1 }, NULL },
+ { "break-insert", { NULL, 0 }, mi_cmd_break_insert},
+ { "break-list", { "info break", }, NULL },
+ { "break-watch", { NULL, 0 }, mi_cmd_break_watch},
+ { "data-disassemble", { NULL, 0 }, mi_cmd_disassemble},
+ { "data-evaluate-expression", { NULL, 0 }, mi_cmd_data_evaluate_expression},
+ { "data-list-changed-registers", { NULL, 0 }, mi_cmd_data_list_changed_registers},
+ { "data-list-register-names", { NULL, 0 }, mi_cmd_data_list_register_names},
+ { "data-list-register-values", { NULL, 0 }, mi_cmd_data_list_register_values},
+ { "data-read-memory", { NULL, 0 }, mi_cmd_data_read_memory},
+ { "data-write-memory", { NULL, 0 }, mi_cmd_data_write_memory},
+ { "data-write-register-values", { NULL, 0 }, mi_cmd_data_write_register_values},
+ { "enable-timings", { NULL, 0 }, mi_cmd_enable_timings},
+ { "environment-cd", { NULL, 0 }, mi_cmd_env_cd},
+ { "environment-directory", { NULL, 0 }, mi_cmd_env_dir},
+ { "environment-path", { NULL, 0 }, mi_cmd_env_path},
+ { "environment-pwd", { NULL, 0 }, mi_cmd_env_pwd},
+ { "exec-abort", { NULL, 0 }, NULL },
+ { "exec-arguments", { "set args", 1 }, NULL },
{ "exec-continue", { NULL, 0 }, mi_cmd_exec_continue},
{ "exec-finish", { NULL, 0 }, mi_cmd_exec_finish},
{ "exec-interrupt", { NULL, 0 }, mi_cmd_exec_interrupt},
{ "exec-next-instruction", { NULL, 0 }, mi_cmd_exec_next_instruction},
{ "exec-return", { NULL, 0 }, mi_cmd_exec_return},
{ "exec-run", { NULL, 0 }, mi_cmd_exec_run},
- { "exec-show-arguments", { NULL, 0 }, NULL, NULL },
- { "exec-signal", { NULL, 0 }, NULL, NULL },
+ { "exec-show-arguments", { NULL, 0 }, NULL },
+ { "exec-signal", { NULL, 0 }, NULL },
{ "exec-step", { NULL, 0 }, mi_cmd_exec_step},
{ "exec-step-instruction", { NULL, 0 }, mi_cmd_exec_step_instruction},
{ "exec-until", { NULL, 0 }, mi_cmd_exec_until},
- { "file-clear", { NULL, 0 }, NULL, NULL },
- { "file-exec-and-symbols", { "file", 1 }, NULL, NULL },
- { "file-exec-file", { "exec-file", 1 }, NULL, NULL },
- { "file-list-exec-sections", { NULL, 0 }, NULL, NULL },
- { "file-list-exec-source-file", { NULL, 0 }, 0, mi_cmd_file_list_exec_source_file},
- { "file-list-exec-source-files", { NULL, 0 }, NULL, mi_cmd_file_list_exec_source_files },
- { "file-list-shared-libraries", { NULL, 0 }, NULL, NULL },
- { "file-list-symbol-files", { NULL, 0 }, NULL, NULL },
- { "file-symbol-file", { "symbol-file", 1 }, NULL, NULL },
- { "gdb-complete", { NULL, 0 }, NULL, NULL },
- { "gdb-exit", { NULL, 0 }, 0, mi_cmd_gdb_exit},
- { "gdb-set", { "set", 1 }, NULL, NULL },
- { "gdb-show", { "show", 1 }, NULL, NULL },
- { "gdb-source", { NULL, 0 }, NULL, NULL },
+ { "file-clear", { NULL, 0 }, NULL },
+ { "file-exec-and-symbols", { "file", 1 }, NULL },
+ { "file-exec-file", { "exec-file", 1 }, NULL },
+ { "file-list-exec-sections", { NULL, 0 }, NULL },
+ { "file-list-exec-source-file", { NULL, 0 }, mi_cmd_file_list_exec_source_file},
+ { "file-list-exec-source-files", { NULL, 0 }, mi_cmd_file_list_exec_source_files },
+ { "file-list-shared-libraries", { NULL, 0 }, NULL },
+ { "file-list-symbol-files", { NULL, 0 }, NULL },
+ { "file-symbol-file", { "symbol-file", 1 }, NULL },
+ { "gdb-complete", { NULL, 0 }, NULL },
+ { "gdb-exit", { NULL, 0 }, mi_cmd_gdb_exit},
+ { "gdb-set", { "set", 1 }, NULL },
+ { "gdb-show", { "show", 1 }, NULL },
+ { "gdb-source", { NULL, 0 }, NULL },
{ "gdb-version", { "show version", 0 }, 0 },
- { "inferior-tty-set", { NULL, 0 }, NULL, mi_cmd_inferior_tty_set},
- { "inferior-tty-show", { NULL, 0 }, NULL, mi_cmd_inferior_tty_show},
- { "interpreter-exec", { NULL, 0 }, 0, mi_cmd_interpreter_exec},
- { "list-features", { NULL, 0 }, 0, mi_cmd_list_features},
- { "overlay-auto", { NULL, 0 }, NULL, NULL },
- { "overlay-list-mapping-state", { NULL, 0 }, NULL, NULL },
- { "overlay-list-overlays", { NULL, 0 }, NULL, NULL },
- { "overlay-map", { NULL, 0 }, NULL, NULL },
- { "overlay-off", { NULL, 0 }, NULL, NULL },
- { "overlay-on", { NULL, 0 }, NULL, NULL },
- { "overlay-unmap", { NULL, 0 }, NULL, NULL },
- { "signal-handle", { NULL, 0 }, NULL, NULL },
- { "signal-list-handle-actions", { NULL, 0 }, NULL, NULL },
- { "signal-list-signal-types", { NULL, 0 }, NULL, NULL },
- { "stack-info-depth", { NULL, 0 }, 0, mi_cmd_stack_info_depth},
- { "stack-info-frame", { NULL, 0 }, 0, mi_cmd_stack_info_frame},
- { "stack-list-arguments", { NULL, 0 }, 0, mi_cmd_stack_list_args},
- { "stack-list-exception-handlers", { NULL, 0 }, NULL, NULL },
- { "stack-list-frames", { NULL, 0 }, 0, mi_cmd_stack_list_frames},
- { "stack-list-locals", { NULL, 0 }, 0, mi_cmd_stack_list_locals},
- { "stack-select-frame", { NULL, 0 }, 0, mi_cmd_stack_select_frame},
- { "symbol-info-address", { NULL, 0 }, NULL, NULL },
- { "symbol-info-file", { NULL, 0 }, NULL, NULL },
- { "symbol-info-function", { NULL, 0 }, NULL, NULL },
- { "symbol-info-line", { NULL, 0 }, NULL, NULL },
- { "symbol-info-symbol", { NULL, 0 }, NULL, NULL },
- { "symbol-list-functions", { NULL, 0 }, NULL, NULL },
- { "symbol-list-lines", { NULL, 0 }, 0, mi_cmd_symbol_list_lines},
- { "symbol-list-types", { NULL, 0 }, NULL, NULL },
- { "symbol-list-variables", { NULL, 0 }, NULL, NULL },
- { "symbol-locate", { NULL, 0 }, NULL, NULL },
- { "symbol-type", { NULL, 0 }, NULL, NULL },
- { "target-attach", { NULL, 0 }, NULL, NULL },
- { "target-compare-sections", { NULL, 0 }, NULL, NULL },
+ { "inferior-tty-set", { NULL, 0 }, mi_cmd_inferior_tty_set},
+ { "inferior-tty-show", { NULL, 0 }, mi_cmd_inferior_tty_show},
+ { "interpreter-exec", { NULL, 0 }, mi_cmd_interpreter_exec},
+ { "list-features", { NULL, 0 }, mi_cmd_list_features},
+ { "overlay-auto", { NULL, 0 }, NULL },
+ { "overlay-list-mapping-state", { NULL, 0 }, NULL },
+ { "overlay-list-overlays", { NULL, 0 }, NULL },
+ { "overlay-map", { NULL, 0 }, NULL },
+ { "overlay-off", { NULL, 0 }, NULL },
+ { "overlay-on", { NULL, 0 }, NULL },
+ { "overlay-unmap", { NULL, 0 }, NULL },
+ { "signal-handle", { NULL, 0 }, NULL },
+ { "signal-list-handle-actions", { NULL, 0 }, NULL },
+ { "signal-list-signal-types", { NULL, 0 }, NULL },
+ { "stack-info-depth", { NULL, 0 }, mi_cmd_stack_info_depth},
+ { "stack-info-frame", { NULL, 0 }, mi_cmd_stack_info_frame},
+ { "stack-list-arguments", { NULL, 0 }, mi_cmd_stack_list_args},
+ { "stack-list-exception-handlers", { NULL, 0 }, NULL },
+ { "stack-list-frames", { NULL, 0 }, mi_cmd_stack_list_frames},
+ { "stack-list-locals", { NULL, 0 }, mi_cmd_stack_list_locals},
+ { "stack-select-frame", { NULL, 0 }, mi_cmd_stack_select_frame},
+ { "symbol-info-address", { NULL, 0 }, NULL },
+ { "symbol-info-file", { NULL, 0 }, NULL },
+ { "symbol-info-function", { NULL, 0 }, NULL },
+ { "symbol-info-line", { NULL, 0 }, NULL },
+ { "symbol-info-symbol", { NULL, 0 }, NULL },
+ { "symbol-list-functions", { NULL, 0 }, NULL },
+ { "symbol-list-lines", { NULL, 0 }, mi_cmd_symbol_list_lines},
+ { "symbol-list-types", { NULL, 0 }, NULL },
+ { "symbol-list-variables", { NULL, 0 }, NULL },
+ { "symbol-locate", { NULL, 0 }, NULL },
+ { "symbol-type", { NULL, 0 }, NULL },
+ { "target-attach", { NULL, 0 }, NULL },
+ { "target-compare-sections", { NULL, 0 }, NULL },
{ "target-detach", { "detach", 0 }, 0 },
{ "target-disconnect", { "disconnect", 0 }, 0 },
{ "target-download", { NULL, 0 }, mi_cmd_target_download},
- { "target-exec-status", { NULL, 0 }, NULL, NULL },
- { "target-file-delete", { NULL, 0 }, NULL, mi_cmd_target_file_delete },
- { "target-file-get", { NULL, 0 }, NULL, mi_cmd_target_file_get },
- { "target-file-put", { NULL, 0 }, NULL, mi_cmd_target_file_put },
- { "target-list-available-targets", { NULL, 0 }, NULL, NULL },
- { "target-list-current-targets", { NULL, 0 }, NULL, NULL },
- { "target-list-parameters", { NULL, 0 }, NULL, NULL },
+ { "target-exec-status", { NULL, 0 }, NULL },
+ { "target-file-delete", { NULL, 0 }, mi_cmd_target_file_delete },
+ { "target-file-get", { NULL, 0 }, mi_cmd_target_file_get },
+ { "target-file-put", { NULL, 0 }, mi_cmd_target_file_put },
+ { "target-list-available-targets", { NULL, 0 }, NULL },
+ { "target-list-current-targets", { NULL, 0 }, NULL },
+ { "target-list-parameters", { NULL, 0 }, NULL },
{ "target-select", { NULL, 0 }, mi_cmd_target_select},
- { "thread-info", { NULL, 0 }, NULL, mi_cmd_thread_info },
- { "thread-list-ids", { NULL, 0 }, 0, mi_cmd_thread_list_ids},
- { "thread-select", { NULL, 0 }, 0, mi_cmd_thread_select},
- { "trace-actions", { NULL, 0 }, NULL, NULL },
- { "trace-delete", { NULL, 0 }, NULL, NULL },
- { "trace-disable", { NULL, 0 }, NULL, NULL },
- { "trace-dump", { NULL, 0 }, NULL, NULL },
- { "trace-enable", { NULL, 0 }, NULL, NULL },
- { "trace-exists", { NULL, 0 }, NULL, NULL },
- { "trace-find", { NULL, 0 }, NULL, NULL },
- { "trace-frame-number", { NULL, 0 }, NULL, NULL },
- { "trace-info", { NULL, 0 }, NULL, NULL },
- { "trace-insert", { NULL, 0 }, NULL, NULL },
- { "trace-list", { NULL, 0 }, NULL, NULL },
- { "trace-pass-count", { NULL, 0 }, NULL, NULL },
- { "trace-save", { NULL, 0 }, NULL, NULL },
- { "trace-start", { NULL, 0 }, NULL, NULL },
- { "trace-stop", { NULL, 0 }, NULL, NULL },
- { "var-assign", { NULL, 0 }, 0, mi_cmd_var_assign},
- { "var-create", { NULL, 0 }, 0, mi_cmd_var_create},
- { "var-delete", { NULL, 0 }, 0, mi_cmd_var_delete},
- { "var-evaluate-expression", { NULL, 0 }, 0, mi_cmd_var_evaluate_expression},
- { "var-info-path-expression", { NULL, 0 }, 0,
- mi_cmd_var_info_path_expression},
- { "var-info-expression", { NULL, 0 }, 0, mi_cmd_var_info_expression},
- { "var-info-num-children", { NULL, 0 }, 0, mi_cmd_var_info_num_children},
- { "var-info-type", { NULL, 0 }, 0, mi_cmd_var_info_type},
- { "var-list-children", { NULL, 0 }, 0, mi_cmd_var_list_children},
- { "var-set-format", { NULL, 0 }, 0, mi_cmd_var_set_format},
- { "var-set-frozen", { NULL, 0 }, 0, mi_cmd_var_set_frozen},
- { "var-show-attributes", { NULL, 0 }, 0, mi_cmd_var_show_attributes},
- { "var-show-format", { NULL, 0 }, 0, mi_cmd_var_show_format},
- { "var-update", { NULL, 0 }, 0, mi_cmd_var_update},
+ { "thread-info", { NULL, 0 }, mi_cmd_thread_info },
+ { "thread-list-ids", { NULL, 0 }, mi_cmd_thread_list_ids},
+ { "thread-select", { NULL, 0 }, mi_cmd_thread_select},
+ { "trace-actions", { NULL, 0 }, NULL },
+ { "trace-delete", { NULL, 0 }, NULL },
+ { "trace-disable", { NULL, 0 }, NULL },
+ { "trace-dump", { NULL, 0 }, NULL },
+ { "trace-enable", { NULL, 0 }, NULL },
+ { "trace-exists", { NULL, 0 }, NULL },
+ { "trace-find", { NULL, 0 }, NULL },
+ { "trace-frame-number", { NULL, 0 }, NULL },
+ { "trace-info", { NULL, 0 }, NULL },
+ { "trace-insert", { NULL, 0 }, NULL },
+ { "trace-list", { NULL, 0 }, NULL },
+ { "trace-pass-count", { NULL, 0 }, NULL },
+ { "trace-save", { NULL, 0 }, NULL },
+ { "trace-start", { NULL, 0 }, NULL },
+ { "trace-stop", { NULL, 0 }, NULL },
+ { "var-assign", { NULL, 0 }, mi_cmd_var_assign},
+ { "var-create", { NULL, 0 }, mi_cmd_var_create},
+ { "var-delete", { NULL, 0 }, mi_cmd_var_delete},
+ { "var-evaluate-expression", { NULL, 0 }, mi_cmd_var_evaluate_expression},
+ { "var-info-path-expression", { NULL, 0 }, mi_cmd_var_info_path_expression},
+ { "var-info-expression", { NULL, 0 }, mi_cmd_var_info_expression},
+ { "var-info-num-children", { NULL, 0 }, mi_cmd_var_info_num_children},
+ { "var-info-type", { NULL, 0 }, mi_cmd_var_info_type},
+ { "var-list-children", { NULL, 0 }, mi_cmd_var_list_children},
+ { "var-set-format", { NULL, 0 }, mi_cmd_var_set_format},
+ { "var-set-frozen", { NULL, 0 }, mi_cmd_var_set_frozen},
+ { "var-show-attributes", { NULL, 0 }, mi_cmd_var_show_attributes},
+ { "var-show-format", { NULL, 0 }, mi_cmd_var_show_format},
+ { "var-update", { NULL, 0 }, mi_cmd_var_update},
{ NULL, }
};
static void mi_execute_cli_command (const char *cmd, int args_p,
const char *args);
-static enum mi_cmd_result mi_execute_async_cli_command (char *mi, char *args, int from_tty);
+static enum mi_cmd_result mi_execute_async_cli_command (char *cli_command,
+ char **argv, int argc);
static void mi_exec_async_cli_cmd_continuation (struct continuation_arg *arg,
int error_p);
}
enum mi_cmd_result
-mi_cmd_exec_run (char *args, int from_tty)
+mi_cmd_exec_run (char *command, char **argv, int argc)
{
/* FIXME: Should call a libgdb function, not a cli wrapper. */
- return mi_execute_async_cli_command ("run", args, from_tty);
+ return mi_execute_async_cli_command ("run", argv, argc);
}
enum mi_cmd_result
-mi_cmd_exec_next (char *args, int from_tty)
+mi_cmd_exec_next (char *command, char **argv, int argc)
{
/* FIXME: Should call a libgdb function, not a cli wrapper. */
- return mi_execute_async_cli_command ("next", args, from_tty);
+ return mi_execute_async_cli_command ("next", argv, argc);
}
enum mi_cmd_result
-mi_cmd_exec_next_instruction (char *args, int from_tty)
+mi_cmd_exec_next_instruction (char *command, char **argv, int argc)
{
/* FIXME: Should call a libgdb function, not a cli wrapper. */
- return mi_execute_async_cli_command ("nexti", args, from_tty);
+ return mi_execute_async_cli_command ("nexti", argv, argc);
}
enum mi_cmd_result
-mi_cmd_exec_step (char *args, int from_tty)
+mi_cmd_exec_step (char *command, char **argv, int argc)
{
/* FIXME: Should call a libgdb function, not a cli wrapper. */
- return mi_execute_async_cli_command ("step", args, from_tty);
+ return mi_execute_async_cli_command ("step", argv, argc);
}
enum mi_cmd_result
-mi_cmd_exec_step_instruction (char *args, int from_tty)
+mi_cmd_exec_step_instruction (char *command, char **argv, int argc)
{
/* FIXME: Should call a libgdb function, not a cli wrapper. */
- return mi_execute_async_cli_command ("stepi", args, from_tty);
+ return mi_execute_async_cli_command ("stepi", argv, argc);
}
enum mi_cmd_result
-mi_cmd_exec_finish (char *args, int from_tty)
+mi_cmd_exec_finish (char *command, char **argv, int argc)
{
/* FIXME: Should call a libgdb function, not a cli wrapper. */
- return mi_execute_async_cli_command ("finish", args, from_tty);
+ return mi_execute_async_cli_command ("finish", argv, argc);
}
enum mi_cmd_result
-mi_cmd_exec_until (char *args, int from_tty)
+mi_cmd_exec_until (char *command, char **argv, int argc)
{
/* FIXME: Should call a libgdb function, not a cli wrapper. */
- return mi_execute_async_cli_command ("until", args, from_tty);
+ return mi_execute_async_cli_command ("until", argv, argc);
}
enum mi_cmd_result
-mi_cmd_exec_return (char *args, int from_tty)
+mi_cmd_exec_return (char *command, char **argv, int argc)
{
/* This command doesn't really execute the target, it just pops the
specified number of frames. */
- if (*args)
+ if (argc)
/* Call return_command with from_tty argument equal to 0 so as to
avoid being queried. */
- return_command (args, 0);
+ return_command (*argv, 0);
else
/* Call return_command with from_tty argument equal to 0 so as to
avoid being queried. */
}
enum mi_cmd_result
-mi_cmd_exec_continue (char *args, int from_tty)
+mi_cmd_exec_continue (char *command, char **argv, int argc)
{
/* FIXME: Should call a libgdb function, not a cli wrapper. */
- return mi_execute_async_cli_command ("continue", args, from_tty);
+ return mi_execute_async_cli_command ("continue", argv, argc);
}
/* Interrupt the execution of the target. Note how we must play around
token when the target finally stops. See comments in
mi_cmd_execute. */
enum mi_cmd_result
-mi_cmd_exec_interrupt (char *args, int from_tty)
+mi_cmd_exec_interrupt (char *command, char **argv, int argc)
{
if (!target_executing)
error ("mi_cmd_exec_interrupt: Inferior not executing.");
- interrupt_target_command (args, from_tty);
+ interrupt_target_command (NULL, 0);
if (current_token)
fputs_unfiltered (current_token, raw_stdout);
fputs_unfiltered ("^done", raw_stdout);
}
enum mi_cmd_result
-mi_cmd_target_download (char *args, int from_tty)
+mi_cmd_target_download (char *command, char **argv, int argc)
{
char *run;
struct cleanup *old_cleanups = NULL;
- run = xstrprintf ("load %s", args);
+ /* There may be at most one parameter -- the name of the
+ file to download. */
+ run = xstrprintf ("load %s", argc ? *argv : "");
old_cleanups = make_cleanup (xfree, run);
- execute_command (run, from_tty);
+ execute_command (run, 0);
do_cleanups (old_cleanups);
return MI_CMD_DONE;
/* Connect to the remote target. */
enum mi_cmd_result
-mi_cmd_target_select (char *args, int from_tty)
+mi_cmd_target_select (char *command, char **argv, int argc)
{
- char *run;
+ char *run = NULL;
struct cleanup *old_cleanups = NULL;
+ int i;
- run = xstrprintf ("target %s", args);
+ if (argc == 0)
+ error ("no target type specified");
+
+ for (i = 0; i < argc; ++i)
+ {
+ if (i == 0)
+ run = concat ("target ", argv[0], NULL);
+ else
+ {
+ char *prev = run;
+ run = concat (run, " ", argv[i], NULL);
+ xfree (prev);
+ }
+ }
+
old_cleanups = make_cleanup (xfree, run);
/* target-select is always synchronous. Once the call has returned
/* NOTE: At present all targets that are connected are also
(implicitly) talking to a halted target. In the future this may
change. */
- execute_command (run, from_tty);
+ execute_command (run, 0);
do_cleanups (old_cleanups);
enum mi_cmd_result r;
free_all_values ();
- if (parse->cmd->argv_func != NULL
- || parse->cmd->args_func != NULL)
+ if (parse->cmd->argv_func != NULL)
{
if (target_executing)
{
}
current_token = xstrdup (parse->token);
cleanup = make_cleanup (free_current_contents, ¤t_token);
- /* FIXME: DELETE THIS! */
- if (parse->cmd->args_func != NULL)
- r = parse->cmd->args_func (parse->args, 0 /*from_tty */ );
- else
- r = parse->cmd->argv_func (parse->command, parse->argv, parse->argc);
+ r = parse->cmd->argv_func (parse->command, parse->argv, parse->argc);
do_cleanups (cleanup);
return r;
}
}
enum mi_cmd_result
-mi_execute_async_cli_command (char *mi, char *args, int from_tty)
+mi_execute_async_cli_command (char *cli_command, char **argv, int argc)
{
struct cleanup *old_cleanups;
char *run;
if (target_can_async_p ())
- run = xstrprintf ("%s %s&", mi, args);
+ run = xstrprintf ("%s %s&", cli_command, argc ? *argv : "");
else
- run = xstrprintf ("%s %s", mi, args);
+ run = xstrprintf ("%s %s", cli_command, argc ? *argv : "");
old_cleanups = make_cleanup (xfree, run);
if (!target_can_async_p ())