From: Vladimir Prus Date: Sun, 23 Mar 2008 08:59:19 +0000 (+0000) Subject: * varobj.c (struct varobj_root): Clarify X-Git-Tag: sid-snapshot-20080401~98 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44a67aa79a7f75ab484b560b0327b21acdd97d5c;p=external%2Fbinutils.git * varobj.c (struct varobj_root): Clarify comment on the frame field. (varobj_create): Don't set frame if we have no block. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f96de06..acb7ff4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2008-03-23 Vladimir Prus + + * 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 PR gdb/544 diff --git a/gdb/varobj.c b/gdb/varobj.c index 2236931..c5df325 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -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);