* varobj.c (varobj_floating_p): New.
* mi/mi-cmd-var.c (mi_cmd_var_update): When passed
'@' as the name, update all floating varobjs.
+2008-03-26 Vladimir Prus <vladimir@codesourcery.com>
+
+ * varobj.h (varobj_floating_p): Declare.
+ * varobj.c (varobj_floating_p): New.
+ * mi/mi-cmd-var.c (mi_cmd_var_update): When passed
+ '@' as the name, update all floating varobjs.
+
2008-03-26 Vladimir Prus <vladimir@codesourcery.com>
* varobj.c (struct varobj_root): Rename use_selected_frame to
(value_of_root): Don't use type_changed as in variable,
adjust comment.
(c_value_of_root): Adjust.
-
+
2008-03-25 Pedro Alves <pedro@codesourcery.com>
* linux-nat.c (linux_nat_attach): Add the pid we attached to, to
/* Check if the parameter is a "*" which means that we want
to update all variables */
- if ((*name == '*') && (*(name + 1) == '\0'))
+ if ((*name == '*' || *name == '@') && (*(name + 1) == '\0'))
{
nv = varobj_list (&rootlist);
cleanup = make_cleanup (xfree, rootlist);
cr = rootlist;
while (*cr != NULL)
{
- varobj_update_one (*cr, print_values, 0 /* implicit */);
+ if (*name == '*' || varobj_floating_p (*cr))
+ varobj_update_one (*cr, print_values, 0 /* implicit */);
cr++;
}
do_cleanups (cleanup);
return r;
}
+/* Return 1 if that varobj is floating, that is is always evaluated in the
+ selected frame, and not bound to thread/frame. Such variable objects
+ are created using '@' as frame specifier to -var-create. */
+int
+varobj_floating_p (struct varobj *var)
+{
+ return var->root->floating;
+}
+
/* Given the value and the type of a variable object,
adjust the value and type to those necessary
for getting children of the variable object.
extern int varobj_editable_p (struct varobj *var);
+extern int varobj_floating_p (struct varobj *var);
+
#endif /* VAROBJ_H */