[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb-patches
Subject:    Fix 'selected frame' varobjs
From:       drow () false ! org (Daniel Jacobowitz)
Date:       2006-12-31 21:42:00
Message-ID: 20061231214221.GB26604 () nevyn ! them ! org
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic