]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* varobj.c (struct varobj_root): Clarify
authorVladimir Prus <vladimir@codesourcery.com>
Sun, 23 Mar 2008 08:59:19 +0000 (08:59 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Sun, 23 Mar 2008 08:59:19 +0000 (08:59 +0000)
        comment on the frame field.
        (varobj_create): Don't set frame if we have no
        block.

gdb/ChangeLog
gdb/varobj.c

index f96de065af877b4ce7fc1cfd03cdd956102d0770..acb7ff46e0065cbbe4f28b0cd6c3eb301c3e1392 100644 (file)
@@ -1,3 +1,10 @@
+2008-03-23  Vladimir Prus  <vladimir@codesourcery.com>
+
+        * varobj.c (struct varobj_root): Clarify
+        comment on the frame field.
+        (varobj_create): Don't set frame if we have no
+        block.
+
 2008-03-21  Daniel Jacobowitz  <dan@codesourcery.com>
 
        PR gdb/544
index 223693180c7be46d48ecab28185cba0ce6d8fbab..c5df3254cfa8861f08199bbe27f38be7b1c342ac 100644 (file)
@@ -62,7 +62,8 @@ struct varobj_root
   /* Block for which this expression is valid */
   struct block *valid_block;
 
-  /* The frame for this expression */
+  /* The frame for this expression.  This field is set iff valid_block is
+     not NULL.  */
   struct frame_id frame;
 
   /* If 1, "update" always recomputes the frame & valid block
@@ -497,7 +498,7 @@ varobj_create (char *objname,
          we must select the appropriate frame before parsing
          the expression, otherwise the value will not be current.
          Since select_frame is so benign, just call it for all cases. */
-      if (fi != NULL)
+      if (innermost_block && fi != NULL)
        {
          var->root->frame = get_frame_id (fi);
          old_fi = get_selected_frame (NULL);