* varobj.h (varobj_floating_p): Declare.
authorVladimir Prus <vladimir@codesourcery.com>
Wed, 26 Mar 2008 14:51:28 +0000 (14:51 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Wed, 26 Mar 2008 14:51:28 +0000 (14:51 +0000)
* varobj.c (varobj_floating_p): New.
* mi/mi-cmd-var.c (mi_cmd_var_update): When passed
'@' as the name, update all floating varobjs.

gdb/ChangeLog
gdb/mi/mi-cmd-var.c
gdb/varobj.c
gdb/varobj.h

index fe1c56f91335bd9207aca265221968c954b8038d..a26b5d57cceae83fcc14a2518668818332468f42 100644 (file)
@@ -1,3 +1,10 @@
+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
@@ -6,7 +13,7 @@
        (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
index dc873cacc43245cca7599b6823d56ddccf36889c..301126d91a9a011f1d9ea01293dc3c80f70099e9 100644 (file)
@@ -558,7 +558,7 @@ mi_cmd_var_update (char *command, char **argv, int argc)
   /* 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);
@@ -574,7 +574,8 @@ mi_cmd_var_update (char *command, char **argv, int argc)
       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);
index 56f3726209053106294f9141412e1f676f26fb96..3e7550715b4b024630841b0533329c9550307ac4 100644 (file)
@@ -1868,6 +1868,15 @@ varobj_value_is_changeable_p (struct varobj *var)
   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.
index 4033b4b955e34e3a4b3c4fd9cb1e1cab504f3184..0926d7288b5b5f811c71234900c02999a8f18b21 100644 (file)
@@ -124,4 +124,6 @@ extern void varobj_invalidate (void);
 
 extern int varobj_editable_p (struct varobj *var);
 
+extern int varobj_floating_p (struct varobj *var);
+
 #endif /* VAROBJ_H */
This page took 0.031432 seconds and 4 git commands to generate.