aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmd-var.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-var.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-var.c')
-rw-r--r--gdb/mi/mi-cmd-var.c48
1 files changed, 16 insertions, 32 deletions
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 50f7add..0adcf1f 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -78,7 +78,7 @@ print_varobj (struct varobj *var, enum print_values print_values,
/* VAROBJ operations */
-enum mi_cmd_result
+void
mi_cmd_var_create (char *command, char **argv, int argc)
{
CORE_ADDR frameaddr = 0;
@@ -138,10 +138,9 @@ mi_cmd_var_create (char *command, char **argv, int argc)
print_varobj (var, PRINT_ALL_VALUES, 0 /* don't print expression */);
do_cleanups (old_cleanups);
- return MI_CMD_DONE;
}
-enum mi_cmd_result
+void
mi_cmd_var_delete (char *command, char **argv, int argc)
{
char *name;
@@ -193,7 +192,6 @@ mi_cmd_var_delete (char *command, char **argv, int argc)
ui_out_field_int (uiout, "ndeleted", numdel);
do_cleanups (old_cleanups);
- return MI_CMD_DONE;
}
/* Parse a string argument into a format value. */
@@ -222,7 +220,7 @@ mi_parse_format (const char *arg)
error (_("Must specify the format as: \"natural\", \"binary\", \"decimal\", \"hexadecimal\", or \"octal\""));
}
-enum mi_cmd_result
+void
mi_cmd_var_set_format (char *command, char **argv, int argc)
{
enum varobj_display_formats format;
@@ -247,10 +245,9 @@ mi_cmd_var_set_format (char *command, char **argv, int argc)
/* Report the value in the new format */
ui_out_field_string (uiout, "value", varobj_get_value (var));
- return MI_CMD_DONE;
}
-enum mi_cmd_result
+void
mi_cmd_var_set_frozen (char *command, char **argv, int argc)
{
struct varobj *var;
@@ -275,11 +272,10 @@ mi_cmd_var_set_frozen (char *command, char **argv, int argc)
/* We don't automatically return the new value, or what varobjs got new
values during unfreezing. If this information is required, client
should call -var-update explicitly. */
- return MI_CMD_DONE;
}
-enum mi_cmd_result
+void
mi_cmd_var_show_format (char *command, char **argv, int argc)
{
enum varobj_display_formats format;
@@ -297,10 +293,9 @@ mi_cmd_var_show_format (char *command, char **argv, int argc)
/* Report the current format */
ui_out_field_string (uiout, "format", varobj_format_string[(int) format]);
- return MI_CMD_DONE;
}
-enum mi_cmd_result
+void
mi_cmd_var_info_num_children (char *command, char **argv, int argc)
{
struct varobj *var;
@@ -314,7 +309,6 @@ mi_cmd_var_info_num_children (char *command, char **argv, int argc)
error (_("mi_cmd_var_info_num_children: Variable object not found"));
ui_out_field_int (uiout, "numchild", varobj_get_num_children (var));
- return MI_CMD_DONE;
}
/* Parse a string argument into a print_values value. */
@@ -364,7 +358,7 @@ mi_print_value_p (struct type *type, enum print_values print_values)
}
}
-enum mi_cmd_result
+void
mi_cmd_var_list_children (char *command, char **argv, int argc)
{
struct varobj *var;
@@ -394,7 +388,7 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
print_values = PRINT_NO_VALUES;
if (VEC_length (varobj_p, children) == 0)
- return MI_CMD_DONE;
+ return;
if (mi_version (uiout) == 1)
cleanup_children = make_cleanup_ui_out_tuple_begin_end (uiout, "children");
@@ -408,10 +402,9 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
do_cleanups (cleanup_child);
}
do_cleanups (cleanup_children);
- return MI_CMD_DONE;
}
-enum mi_cmd_result
+void
mi_cmd_var_info_type (char *command, char **argv, int argc)
{
struct varobj *var;
@@ -425,10 +418,9 @@ mi_cmd_var_info_type (char *command, char **argv, int argc)
error (_("mi_cmd_var_info_type: Variable object not found"));
ui_out_field_string (uiout, "type", varobj_get_type (var));
- return MI_CMD_DONE;
}
-enum mi_cmd_result
+void
mi_cmd_var_info_path_expression (char *command, char **argv, int argc)
{
struct varobj *var;
@@ -445,11 +437,9 @@ mi_cmd_var_info_path_expression (char *command, char **argv, int argc)
path_expr = varobj_get_path_expr (var);
ui_out_field_string (uiout, "path_expr", path_expr);
-
- return MI_CMD_DONE;
}
-enum mi_cmd_result
+void
mi_cmd_var_info_expression (char *command, char **argv, int argc)
{
enum varobj_languages lang;
@@ -467,10 +457,9 @@ mi_cmd_var_info_expression (char *command, char **argv, int argc)
ui_out_field_string (uiout, "lang", varobj_language_string[(int) lang]);
ui_out_field_string (uiout, "exp", varobj_get_expression (var));
- return MI_CMD_DONE;
}
-enum mi_cmd_result
+void
mi_cmd_var_show_attributes (char *command, char **argv, int argc)
{
int attr;
@@ -493,10 +482,9 @@ mi_cmd_var_show_attributes (char *command, char **argv, int argc)
attstr = "noneditable";
ui_out_field_string (uiout, "attr", attstr);
- return MI_CMD_DONE;
}
-enum mi_cmd_result
+void
mi_cmd_var_evaluate_expression (char *command, char **argv, int argc)
{
struct varobj *var;
@@ -552,11 +540,9 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc)
ui_out_field_string (uiout, "value", varobj_get_formatted_value (var, format));
else
ui_out_field_string (uiout, "value", varobj_get_value (var));
-
- return MI_CMD_DONE;
}
-enum mi_cmd_result
+void
mi_cmd_var_assign (char *command, char **argv, int argc)
{
struct varobj *var;
@@ -579,10 +565,9 @@ mi_cmd_var_assign (char *command, char **argv, int argc)
error (_("mi_cmd_var_assign: Could not assign expression to variable object"));
ui_out_field_string (uiout, "value", varobj_get_value (var));
- return MI_CMD_DONE;
}
-enum mi_cmd_result
+void
mi_cmd_var_update (char *command, char **argv, int argc)
{
struct varobj *var;
@@ -620,7 +605,7 @@ mi_cmd_var_update (char *command, char **argv, int argc)
if (nv <= 0)
{
do_cleanups (cleanup);
- return MI_CMD_DONE;
+ return;
}
cr = rootlist;
while (*cr != NULL)
@@ -645,7 +630,6 @@ mi_cmd_var_update (char *command, char **argv, int argc)
varobj_update_one (var, print_values, 1 /* explicit */);
do_cleanups (cleanup);
}
- return MI_CMD_DONE;
}
/* Helper for mi_cmd_var_update(). */