+2013-10-27 Yao Qi <yao@codesourcery.com>
+
+ * varobj.c (struct varobj_root) <lang>: Rename to 'lang_ops'.
+ (varobj_create, varobj_get_path_expr): Update.
+ (varobj_value_has_mutated, varobj_update): Likewise.
+ (create_child_with_value, new_root_variable): Likewise.
+ (number_of_children, name_of_variable): Likewise.
+ (value_of_child, my_value_of_variable): Likewise.
+ (varobj_value_is_changeable_p): Likewise.
+
2013-10-25 Yao Qi <yao@codesourcery.com>
* language.h (struct lang_varobj_ops): Declare.
/* Language-related operations for this variable and its
children. */
- const struct lang_varobj_ops *lang;
+ const struct lang_varobj_ops *lang_ops;
/* The varobj for this root node. */
struct varobj *rootvar;
}
/* Set language info */
- var->root->lang = var->root->exp->language_defn->la_varobj_ops;
+ var->root->lang_ops = var->root->exp->language_defn->la_varobj_ops;
install_new_value (var, value, 1 /* Initial assignment */);
when creating varobj, so here it should be
child varobj. */
gdb_assert (!is_root_p (var));
- return (*var->root->lang->path_expr_of_child) (var);
+ return (*var->root->lang_ops->path_expr_of_child) (var);
}
}
if (var->num_children < 0)
return 0;
- if (var->root->lang->value_has_mutated)
- return var->root->lang->value_has_mutated (var, new_value, new_type);
+ if (var->root->lang_ops->value_has_mutated)
+ return var->root->lang_ops->value_has_mutated (var, new_value, new_type);
else
return 0;
}
if (new)
new_type = value_type (new);
else
- new_type = v->root->lang->type_of_child (v->parent, v->index);
+ new_type = v->root->lang_ops->type_of_child (v->parent, v->index);
if (varobj_value_has_mutated (v, new, new_type))
{
child->type = value_actual_type (value, 0, NULL);
else
/* Otherwise, we must compute the type. */
- child->type = (*child->root->lang->type_of_child) (child->parent,
- child->index);
+ child->type = (*child->root->lang_ops->type_of_child) (child->parent,
+ child->index);
install_new_value (child, value, 1);
return child;
struct varobj *var = new_variable ();
var->root = (struct varobj_root *) xmalloc (sizeof (struct varobj_root));
- var->root->lang = NULL;
+ var->root->lang_ops = NULL;
var->root->exp = NULL;
var->root->valid_block = NULL;
var->root->frame = null_frame_id;
static int
number_of_children (struct varobj *var)
{
- return (*var->root->lang->number_of_children) (var);
+ return (*var->root->lang_ops->number_of_children) (var);
}
/* What is the expression for the root varobj VAR? Returns a malloc'd
static char *
name_of_variable (struct varobj *var)
{
- return (*var->root->lang->name_of_variable) (var);
+ return (*var->root->lang_ops->name_of_variable) (var);
}
/* What is the name of the INDEX'th child of VAR? Returns a malloc'd
static char *
name_of_child (struct varobj *var, int index)
{
- return (*var->root->lang->name_of_child) (var, index);
+ return (*var->root->lang_ops->name_of_child) (var, index);
}
/* If frame associated with VAR can be found, switch
{
struct value *value;
- value = (*parent->root->lang->value_of_child) (parent, index);
+ value = (*parent->root->lang_ops->value_of_child) (parent, index);
return value;
}
{
if (var->dynamic->pretty_printer != NULL)
return varobj_value_get_print_value (var->value, var->format, var);
- return (*var->root->lang->value_of_variable) (var, format);
+ return (*var->root->lang_ops->value_of_variable) (var, format);
}
else
return NULL;
int
varobj_value_is_changeable_p (struct varobj *var)
{
- return var->root->lang->value_is_changeable_p (var);
+ return var->root->lang_ops->value_is_changeable_p (var);
}
/* Return 1 if that varobj is floating, that is is always evaluated in the