diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-05-23 15:34:36 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-05-23 15:34:36 +0000 |
commit | 61d8f2758f5881aa0138e31b45105515e98eb715 (patch) | |
tree | 02e8b5dd73af48e20fe6ac82c7eee9f3ae6626f2 /gdb/mi/mi-cmd-var.c | |
parent | 70926f63737781fd8c8485caafe0da987379ba97 (diff) | |
download | gdb-61d8f2758f5881aa0138e31b45105515e98eb715.zip gdb-61d8f2758f5881aa0138e31b45105515e98eb715.tar.gz gdb-61d8f2758f5881aa0138e31b45105515e98eb715.tar.bz2 |
gdb/
Remove already unreachable code.
* varobj.c (varobj_get_handle): Fix comment when error is called.
All callers updated.
Diffstat (limited to 'gdb/mi/mi-cmd-var.c')
-rw-r--r-- | gdb/mi/mi-cmd-var.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index 143074b..9de8d3d 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -185,9 +185,6 @@ mi_cmd_var_delete (char *command, char **argv, int argc) var = varobj_get_handle (name); - if (var == NULL) - error (_("mi_cmd_var_delete: Variable object not found.")); - numdel = varobj_delete (var, NULL, children_only_p); ui_out_field_int (uiout, "ndeleted", numdel); @@ -233,9 +230,6 @@ mi_cmd_var_set_format (char *command, char **argv, int argc) /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); - if (var == NULL) - error (_("mi_cmd_var_set_format: Variable object not found")); - format = mi_parse_format (argv[1]); /* Set the format of VAR to given format */ @@ -258,8 +252,6 @@ mi_cmd_var_set_frozen (char *command, char **argv, int argc) error (_("-var-set-format: Usage: NAME FROZEN_FLAG.")); var = varobj_get_handle (argv[0]); - if (var == NULL) - error (_("Variable object not found")); if (strcmp (argv[1], "0") == 0) frozen = 0; @@ -287,8 +279,6 @@ mi_cmd_var_show_format (char *command, char **argv, int argc) /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); - if (var == NULL) - error (_("mi_cmd_var_show_format: Variable object not found")); format = varobj_get_display_format (var); @@ -306,8 +296,6 @@ mi_cmd_var_info_num_children (char *command, char **argv, int argc) /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); - if (var == NULL) - error (_("mi_cmd_var_info_num_children: Variable object not found")); ui_out_field_int (uiout, "numchild", varobj_get_num_children (var)); } @@ -378,8 +366,6 @@ mi_cmd_var_list_children (char *command, char **argv, int argc) var = varobj_get_handle (argv[0]); else var = varobj_get_handle (argv[1]); - if (var == NULL) - error (_("Variable object not found")); children = varobj_list_children (var); ui_out_field_int (uiout, "numchild", VEC_length (varobj_p, children)); @@ -415,8 +401,6 @@ mi_cmd_var_info_type (char *command, char **argv, int argc) /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); - if (var == NULL) - error (_("mi_cmd_var_info_type: Variable object not found")); ui_out_field_string (uiout, "type", varobj_get_type (var)); } @@ -432,8 +416,6 @@ mi_cmd_var_info_path_expression (char *command, char **argv, int argc) /* Get varobj handle, if a valid var obj name was specified. */ var = varobj_get_handle (argv[0]); - if (var == NULL) - error (_("Variable object not found")); path_expr = varobj_get_path_expr (var); @@ -451,8 +433,6 @@ mi_cmd_var_info_expression (char *command, char **argv, int argc) /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); - if (var == NULL) - error (_("mi_cmd_var_info_expression: Variable object not found")); lang = varobj_get_language (var); @@ -472,8 +452,6 @@ mi_cmd_var_show_attributes (char *command, char **argv, int argc) /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); - if (var == NULL) - error (_("mi_cmd_var_show_attributes: Variable object not found")); attr = varobj_get_attributes (var); /* FIXME: define masks for attributes */ @@ -534,8 +512,6 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc) /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[optind]); - if (var == NULL) - error (_("Variable object not found")); if (formatFound) ui_out_field_string (uiout, "value", varobj_get_formatted_value (var, format)); @@ -554,8 +530,6 @@ mi_cmd_var_assign (char *command, char **argv, int argc) /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); - if (var == NULL) - error (_("mi_cmd_var_assign: Variable object not found")); if (!varobj_editable_p (var)) error (_("mi_cmd_var_assign: Variable object is not editable")); @@ -634,8 +608,6 @@ mi_cmd_var_update (char *command, char **argv, int argc) { /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (name); - if (var == NULL) - error (_("mi_cmd_var_update: Variable object not found")); if (mi_version (uiout) <= 1) cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, "changelist"); |