- struct varobj *var;
-
- var = new varobj ();
- var->index = -1;
- var->type = NULL;
- var->value = NULL;
- var->num_children = -1;
- var->parent = NULL;
- var->children = NULL;
- var->format = FORMAT_NATURAL;
- var->root = NULL;
- var->updated = 0;
- var->frozen = 0;
- var->not_fetched = 0;
- var->dynamic = XNEW (struct varobj_dynamic);
- var->dynamic->children_requested = 0;
- var->from = -1;
- var->to = -1;
- var->dynamic->constructor = 0;
- var->dynamic->pretty_printer = 0;
- var->dynamic->child_iter = 0;
- var->dynamic->saved_item = 0;
-
- return var;
-}
-
-/* Allocate memory and initialize a new root variable. */
-static struct varobj *
-new_root_variable (void)
-{
- struct varobj *var = new_variable ();
-
- var->root = new varobj_root ();
- var->root->lang_ops = NULL;
- var->root->exp = NULL;
- var->root->valid_block = NULL;
- var->root->frame = null_frame_id;
- var->root->floating = 0;
- var->root->rootvar = NULL;
- var->root->is_valid = 1;
-
- return var;