[MI] lvalues and variable_editable

Daniel Jacobowitz drow@false.org
Mon Jul 9 12:05:00 GMT 2007


On Mon, Jul 09, 2007 at 05:51:42PM +1200, Nick Roberts wrote:
> (Me)
> 
>  > Anyway let me submit a more complete patch, in due course, for consideration
>  > after the release.
> 
> This is what I have in mind.  There are no regressions, at least with MI (I
> can't test Insight).  If there's still time, this could go in before the
> branch.  I also have a (much smaller) change, that I've submitted earlier, for
> after the release which adds the editable field to the output of -var-create
> and -var-list-children, .

Thanks for doing this.  I have two questions for you.

- Why do variable_editable_p and varobj_value_is_changeable_p have to
be different?  That is, do we need varobj_value_is_changeable_p to be
true for any non-lvals.  If not, we can eliminate one of them.

- Why do you need to re-evaluate the expression?  I think we can use
var->value, and report anything with a NULL value as non-editable.
No point editing it if we can't save it somewhere.

Also, I think varobj_value_is_changeable_p was missing from your
changelog (if I've correctly understood where one hunk of that patch
goes), and the patch had "variable_editable_pv" in it.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list