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: [PATCH] MI: lvalues and variable_editable


 > On Tuesday 30 October 2007 14:04:53 Nick Roberts wrote:
 > >  > I believe that var->value will be NULL.
 > > 
 > > Yes, that looks good.  I'll use:
 > > 
 > >   if (!var->value || !VALUE_LVAL(var->value))
 > >     return 0;
 > > 
 > > and that should keep us both happy.
 > 
 > As long there which code *replaces* gdb_evaluate_expression, I'm 
 > perfectly happy. Thanks!

Using var->value == NULL means that variable objects of pointers that cannot
be dereferenced are "noneditable".  This means that such variable objects
may change from being "editable" to "noneditable" during execution.  This
may not be a bad thing as discussion started from posts about not being
able to assign values to variable objects that were described as "editable".

I'll look at combining varobj_editable_p with the test in
mi_cmd_var_assign:

  if (!varobj_set_value (var, expression))
    error (_("mi_cmd_var_assign: Could not assign expression to variable object"

to give one message.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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