gdb/
Remove already unreachable code. * varobj.c (varobj_get_handle): Fix comment when error is called. All callers updated.
This commit is contained in:
parent
70926f6373
commit
61d8f2758f
3 changed files with 8 additions and 30 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Remove already unreachable code.
|
||||
* varobj.c (varobj_get_handle): Fix comment when error is called.
|
||||
All callers updated.
|
||||
|
||||
2009-05-23 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* README (`configure' options): Document GDB-specific options to
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -591,8 +591,8 @@ varobj_gen_name (void)
|
|||
return obj_name;
|
||||
}
|
||||
|
||||
/* Given an "objname", returns the pointer to the corresponding varobj
|
||||
or NULL if not found */
|
||||
/* Given an OBJNAME, returns the pointer to the corresponding varobj. Call
|
||||
error if OBJNAME cannot be found. */
|
||||
|
||||
struct varobj *
|
||||
varobj_get_handle (char *objname)
|
||||
|
|
Loading…
Reference in a new issue