aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmd-env.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-06-25 15:15:42 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-06-25 15:15:42 +0000
commitce8f13f88e2d8fc915e0af5039080ec0b293ee11 (patch)
treed4ac1035c7bd3666217ac13efa282175d78406e9 /gdb/mi/mi-cmd-env.c
parenta2840c355960fdc116b12bd02abba2c5b9a9a653 (diff)
downloadgdb-ce8f13f88e2d8fc915e0af5039080ec0b293ee11.zip
gdb-ce8f13f88e2d8fc915e0af5039080ec0b293ee11.tar.gz
gdb-ce8f13f88e2d8fc915e0af5039080ec0b293ee11.tar.bz2
Kill the return value for all MI command functions.
* mi/mi-cmds.h (enum mi_cmd_result): Remove. (mi_cmd_argv_ftype): Change return type to void. * mi/mi-main.c: Adjust all function that implement MI commands to return nothing. (struct captured_mi_execute_command_actions): Remove the rc field. (mi_cmd_execute): Return nothing. (mi_execute_async_cli_command): Return nothing. (mi_cmd_exec_interrupt): Don't print ^done here. (mi_cmd_target_select): Don't print ^connected here. (captured_mi_execute_command): Don't check for MI_CMD_DONE. Special-case -target-select and output ^connected, not ^done. * mi/mi-cmd-break.c: Adjust. * mi/mi-cmd-disas.c: Adjust. * mi/mi-cmd-env.c: Adjust. * mi/mi-cmd-file.c: Adjust. * mi/mi-cmd-stack.c: Adjust. * mi/mi-cmd-target.c: Adjust. * mi/mi-cmd-var.c: Adjust. * mi/mi-interp.c: Adjust. * mi/mi-symbol-cmds.c: Adjust.
Diffstat (limited to 'gdb/mi/mi-cmd-env.c')
-rw-r--r--gdb/mi/mi-cmd-env.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
index aee7994..327ddc5 100644
--- a/gdb/mi/mi-cmd-env.c
+++ b/gdb/mi/mi-cmd-env.c
@@ -64,7 +64,7 @@ env_execute_cli_command (const char *cmd, const char *args)
/* Print working directory. */
-enum mi_cmd_result
+void
mi_cmd_env_pwd (char *command, char **argv, int argc)
{
if (argc > 0)
@@ -73,27 +73,23 @@ mi_cmd_env_pwd (char *command, char **argv, int argc)
if (mi_version (uiout) < 2)
{
env_execute_cli_command ("pwd", NULL);
- return MI_CMD_DONE;
+ return;
}
/* Otherwise the mi level is 2 or higher. */
getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
ui_out_field_string (uiout, "cwd", gdb_dirbuf);
-
- return MI_CMD_DONE;
}
/* Change working directory. */
-enum mi_cmd_result
+void
mi_cmd_env_cd (char *command, char **argv, int argc)
{
if (argc == 0 || argc > 1)
error (_("mi_cmd_env_cd: Usage DIRECTORY"));
env_execute_cli_command ("cd", argv[0]);
-
- return MI_CMD_DONE;
}
static void
@@ -108,7 +104,7 @@ env_mod_path (char *dirname, char **which_path)
}
/* Add one or more directories to start of executable search path. */
-enum mi_cmd_result
+void
mi_cmd_env_path (char *command, char **argv, int argc)
{
char *exec_path;
@@ -133,7 +129,7 @@ mi_cmd_env_path (char *command, char **argv, int argc)
{
for (i = argc - 1; i >= 0; --i)
env_execute_cli_command ("path", argv[i]);
- return MI_CMD_DONE;
+ return;
}
/* Otherwise the mi level is 2 or higher. */
@@ -177,12 +173,10 @@ mi_cmd_env_path (char *command, char **argv, int argc)
xfree (exec_path);
env = get_in_environ (inferior_environ, path_var_name);
ui_out_field_string (uiout, "path", env);
-
- return MI_CMD_DONE;
}
/* Add zero or more directories to the front of the source path. */
-enum mi_cmd_result
+void
mi_cmd_env_dir (char *command, char **argv, int argc)
{
int i;
@@ -205,7 +199,7 @@ mi_cmd_env_dir (char *command, char **argv, int argc)
{
for (i = argc - 1; i >= 0; --i)
env_execute_cli_command ("dir", argv[i]);
- return MI_CMD_DONE;
+ return;
}
/* Otherwise mi level is 2 or higher. */
@@ -238,21 +232,17 @@ mi_cmd_env_dir (char *command, char **argv, int argc)
ui_out_field_string (uiout, "source-path", source_path);
forget_cached_source_info ();
-
- return MI_CMD_DONE;
}
/* Set the inferior terminal device name. */
-enum mi_cmd_result
+void
mi_cmd_inferior_tty_set (char *command, char **argv, int argc)
{
set_inferior_io_terminal (argv[0]);
-
- return MI_CMD_DONE;
}
/* Print the inferior terminal device name */
-enum mi_cmd_result
+void
mi_cmd_inferior_tty_show (char *command, char **argv, int argc)
{
const char *inferior_io_terminal = get_inferior_io_terminal ();
@@ -262,8 +252,6 @@ mi_cmd_inferior_tty_show (char *command, char **argv, int argc)
if (inferior_io_terminal)
ui_out_field_string (uiout, "inferior_tty_terminal", inferior_io_terminal);
-
- return MI_CMD_DONE;
}
void