From: Nick Roberts <nickrob@snap.net.nz>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [MI] lvalues and variable_editable
Date: Mon, 09 Jul 2007 12:38:00 -0000 [thread overview]
Message-ID: <18066.11299.571385.305234@kahikatea.snap.net.nz> (raw)
In-Reply-To: <20070709120452.GA4011@caradoc.them.org>
> - 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.
Taking my earlier example:
-var-create - * "i1 + i2"
As it's not an lvalue it's not editable (variable_editable_p returns 0)
but it's value can surely change (variable_changeable_p returns 1). So GDB
has to check for this and report any change when -var-update is issued.
While
int m[10]
-var-create - * m
is not editable and not changeable.
Does this show that variable_editable_p and varobj_value_is_changeable_p
are necessarily different? (One is used to tell the user he can't edit the
value, the other to tell GDB not to bother check for a change in value.)
> - 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.
Perhaps you don't. Currently you can do things like:
(gdb)
-var-create - * 1/0
^done,name="var1",numchild="0",value="",type="int"
(gdb)
-var-create - * 0/0
^done,name="var2",numchild="0",value="",type="int"
I was just being cautious, and cut and pasting.
> 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),
OK.
> and the patch had "variable_editable_pv" in it.
Sticky fingers, sorry about that. My version of varobj.c compiles and doesn't
have this, of course.
--
Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2007-07-09 12:38 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 [this message]
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
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=18066.11299.571385.305234@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
/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