RFC: MI - Detecting change of string contents with variable objects

Vladimir Prus ghost@cs.msu.su
Sat Jan 6 07:07:00 GMT 2007


On Saturday 06 January 2007 00:53, Nick Roberts wrote:
>  > > I agree.  Below is my latest patch, incorporating some of your
>  > > suggestions.
>  > 
>  > This looks fine to me if it's fine with Vlad.
>  > 
>  > >   	      gdb_assert (!value_lazy (var->value));
>  > > ! 	      gdb_assert (!value_lazy (value));
>  > > ! 	      
>  > > ! 	      if (!value_contents_equal (var->value, value))
>  > > ! 		changed = 1;
>  > 
>  > Why are you removing the second assert here?
> 
> Argh!  Vladimir had the same question, I thought I'd put it back.  I have now.
> I've also used:
>  
>   strcmp (var->print_value, print_value) != 0
> 
> since that method seems to be the norm in varobj.c, and GDB generally.
> 
> I've committed this change, which you might not like, because I think Vladimir
> is agreeable to it.  Of course, I'll make changes, including reversion, if
> there are problems.

To clarify, I am still not comfortable about the change that's supposedly
needed only for 'char*' variables but yet affects variables of all possible
types -- especially given that we don't any mechanism to customize
display of other types yes. At the same time, we have enough time now to discover
any possible fallout, so we can try.

- Volodya



More information about the Gdb-patches mailing list