This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix 'selected frame' varobjs
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vladimir Prus <ghost at cs dot msu dot su>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 31 Dec 2006 16:42:21 -0500
- Subject: Re: Fix 'selected frame' varobjs
- References: <200612310301.42649.ghost@cs.msu.su>
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