From: Vladimir Prus <ghost@cs.msu.su>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [MI] lvalues and variable_editable
Date: Wed, 11 Jul 2007 13:09:00 -0000 [thread overview]
Message-ID: <200707111708.52171.ghost@cs.msu.su> (raw)
In-Reply-To: <18068.50600.964338.269608@kahikatea.snap.net.nz>
On Wednesday 11 July 2007 15:57, Nick Roberts wrote:
> > 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.
Well, current varobj_changeable_p answers the question "do we need to store
a non-lazy value inside varobj, so that after -var-update we can detect that
the value has changed". It follows that -var-evaluate-expression should print
some static string for such varobjs.
As for editability, two approaches are possible:
1. If static string is printed as value, it makes no sense to assign anything.
In that case, using varobj_changeable_p by varobj_editable_p is reasonable.
2. Why not allow assigning "{1,2}" to a varobj of expression type? That might
be good feature to user, but I'm not sure how hard it will be to implement.
So for now I think we can take (1), and then use varobj_changeable_p from
varobj_editable_p. Should that become problematic, we can always make
the functions completely independent.
- Volodya
prev parent reply other threads:[~2007-07-11 13:09 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
2007-07-11 13:09 ` Vladimir Prus [this message]
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=200707111708.52171.ghost@cs.msu.su \
--to=ghost@cs.msu.su \
--cc=gdb-patches@sources.redhat.com \
--cc=nickrob@snap.net.nz \
/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