This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] -var-update
Nick Roberts wrote:
> > I do not quite understand why coerce_array is used; I suspect the
> > contents of an array are checked via the children instead of the
> > parent. coerce_array happens to also call coerce_ref.
>
> Maybe it's historical, as varobj_update used value_equal previously and
> this uses coerce_array.
>
> Anyway here's a patch that actually seems to work. I've taken code from
> c_val_print. Maybe there should be more checks and I've not tested
> varobj_set_value (-var-assign) yet, but I thought I'd sound out the
> genaral approcah first.
I think that in any case, you should add a function and call it, instead of
adding three identical code fragments. BTW, why coerce_ref is not suitable
here?
- Volodya