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: RFC: MI - Detecting change of string contents with variable objects


Nick Roberts wrote:

>  >  Should a varobj always report changed if the way GDB
>  > would display the value has changed, in which case the special casing
>  > isn't necessary?
> 
> That's a vary good idea.  Here's a revised patch that isn't language
> dependent. In addition to detecting string contents changes it detects
> when the output
> format has changed with -var-set-format.  I don't see this as a bad thing
> and it means that my patch earlier in the year for including the value
> in the output of -var-set-format probably isn't needed.
> 
> It also means that value_contents_equal is not needed any longer, although
> I guess there's no harm in keeping it.

Why do you need the value_get_print_value function? I think that the right
semantic of -var-update is that it returns all such variable objects for
which the -var-evaluate-expression will return different value before and
after -var-update. -var-evaluate-expression is the only way to get a value
of varobj, so we should be using that, not some similar but different
function.

In order words, why can't you just call varobj_get_value instead of
introducing and calling a new function? 

- Volodya



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