This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix 'selected frame' varobjs


On Sun, Dec 31, 2006 at 03:01:42AM +0300, Vladimir Prus wrote:
> @@ -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;
>      }
>  

"in the future", "notices the change".  Should we be doing this
everywhere that we set var->error (probably add a new helper to do
that)?  There's about a half-dozen places.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]