diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-03-23 08:59:19 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-03-23 08:59:19 +0000 |
commit | 036c7acb86dfaa33502052ef5a10704634eeb5fc (patch) | |
tree | 4c7618f157a4d792c438c735f1a78bc07a202011 /gdb/varobj.c | |
parent | d713ed0c5bdba9a8634f7741631ce650596d6cf9 (diff) | |
download | gdb-036c7acb86dfaa33502052ef5a10704634eeb5fc.tar.gz |
* varobj.c (struct varobj_root): Clarify
comment on the frame field.
(varobj_create): Don't set frame if we have no
block.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index 223693180c7..c5df3254cfa 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); |