This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] MI: lvalues and variable_editable
> > ? /* Returns a malloc'ed list with all root variable objects */
> > --- 872,920 ----
> > ? ? struct value *value;
> > ? ? int saved_input_radix = input_radix;
>
> I suggest
>
>
> gdb_assert (varobj_is_editable_p (var));
>
> here, so clearly document the assumptions the trailing
> code makes.
Sure.
>...
> > + ? if (CPLUS_FAKE_CHILD (var))
> > + ? ? return 0;
> > +
> > + ? if (!(var->root->is_valid && var->value && VALUE_LVAL(var->value)))
> > + ? ? return 0;
>
> I believe this test captures CPLUS_FAKE_CHILD as well, so you don't
> need to have separate test for that.
I'll remove it.
>...
> > ? ? /* FIXME: define masks for attributes */
> > ! ? if (!varobj_editable_p (var))
> > ? ? ? error (_("mi_cmd_var_assign: Variable object is not editable"));
>
> I presume the FIXME is now stale?
I'll remove that too
>...
> Aside from the minor points above, I don't have any objections to this
> patch. Dan, what would you say?
>
> - Volodya
--
Nick http://www.inet.net.nz/~nickrob