--- gdb/varobj.c (/mirrors/gdb_mainline) (revision 3011) +++ gdb/varobj.c (/patches/gdb/at_varobjs/gdb_mainline) (revision 3011) @@ -1061,6 +1061,14 @@ varobj_update (struct varobj **varp, str if (new == NULL) { (*varp)->error = 1; + /* Also set the value to NULL, so that + when the value becomes valid in future, + -var-update notice the change. */ + if ((*varp)->value != NULL) + { + value_free ((*varp)->value); + (*varp)->value = NULL; + } return -1; } @@ -1950,11 +1958,10 @@ c_value_of_root (struct varobj **var_han /* Determine whether the variable is still around. */ - if (var->root->valid_block == NULL) + if (var->root->valid_block == NULL || var->root->use_selected_frame) within_scope = 1; else { - reinit_frame_cache (); fi = frame_find_by_id (var->root->frame); within_scope = fi != NULL; /* FIXME: select_frame could fail */