Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [MI] lvalues and variable_editable
Date: Wed, 11 Jul 2007 11:57:00 -0000	[thread overview]
Message-ID: <18068.50600.964338.269608@kahikatea.snap.net.nz> (raw)
In-Reply-To: <200707111045.47111.ghost@cs.msu.su>

 > 	(gdb)
 > 	-var-assign F.public.i 10
 > 	&"mi_cmd_var_assign: Could not assign expression to varible object\n"
 > 	^error,msg="mi_cmd_var_assign: Could not assign expression to varible object"
 > 	(gdb)
 > 
 > Clearly, gdb does not like assigning to F.public.i, and I'm pretty sure it's
 > because VALUE_LVAL for that varobj returns false. Naturally, it's reasonable
 > to expect to have F.public.i marked as non-editable, so that frontend won't
 > even let the user to assign a value. I don't think your patch will do that.

OK.  It would be strange to try to edit such variable objects, but I take
your point and will change it (back to it's original set of conditions).

 > 	-var-update F
 > 	^done,changelist=[{name="F",in_scope="true",type_changed="false"}]
 > 	(gdb)
 > 	-var-evaluate-expression F
 > 	^done,value="{void (void)} 0x80483ca <bar()>"
 > 	(gdb)
 > 
 > Note that the current gdb has no problem whatsoever with printing the value
 > of function, and it also notices when a value changes. If you change c_value_of_variable
 > as outlined above, you'll only see "<function>" as output.
 > 
 > > Functions and methods are surely not changeable. 
 > 
 > I think you misunderstand the meaning of varobj_value_is_changeable_p. It
 > does not indicate if the object itself may be changed, by the programming
 > language or by gdb user. It indicates if the value of varobj, as printed by
 > -var-evaluate-expression, may change. As shown above, in current gdb, the
 > value of varobj having type 'function' can change just fine, in a meaningful
 > way.

It shows I misunderstood the concept of the value of a function.  I'll
change that also, which means varobj_editable_p can't be easily derived
from varobj_changeable_p.


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


  parent reply	other threads:[~2007-07-11 11:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-26 11:46 Nick Roberts
2007-07-03 16:16 ` Daniel Jacobowitz
2007-07-04  3:04   ` Nick Roberts
2007-07-04  3:11     ` Nick Roberts
2007-07-04  3:14       ` Daniel Jacobowitz
2007-07-04  3:35         ` Nick Roberts
2007-07-04 15:57           ` Daniel Jacobowitz
2007-07-09  5:51           ` Nick Roberts
2007-07-09 12:05             ` Daniel Jacobowitz
2007-07-09 12:38               ` Nick Roberts
2007-07-10  1:45                 ` Daniel Jacobowitz
2007-07-09 12:46               ` Vladimir Prus
2007-07-09 13:13             ` Vladimir Prus
2007-07-10  0:49               ` Nick Roberts
2007-07-10 17:14                 ` Vladimir Prus
2007-07-11  1:26                   ` Nick Roberts
2007-07-11  6:46                     ` Vladimir Prus
2007-07-11  7:10                       ` Vladimir Prus
2007-07-11 11:57                       ` Nick Roberts [this message]
2007-07-11 13:09                         ` Vladimir Prus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18068.50600.964338.269608@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox