From: Jim Blandy <jimb@codesourcery.com>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: gdb-patches@sources.redhat.com, Vladimir Prus <ghost@cs.msu.su>
Subject: Re: [PATCH] -var-update [was Re: Variable objects: references formatting]
Date: Mon, 08 May 2006 17:27:00 -0000 [thread overview]
Message-ID: <vt2ac9s2zre.fsf@theseus.home.> (raw)
In-Reply-To: <17503.15435.371371.707494@farnswood.snap.net.nz> (Nick Roberts's message of "Tue, 9 May 2006 00:40:43 +1200")
Nick Roberts <nickrob@snap.net.nz> writes:
> > > However, do you see the problem with references that I mentioned earlier
> > > (that they don't seem to disappear from the changelist with -var-update)?
> > > This seems to be the case for any variable object made from a reference.
> >
> > Yes, I see that for variable object created from reference, -var-update *
> > always mentions that. Looking at this under debugger, it seems that the call
> > to my_value_equal in varobj_update compares the value of *reference* to the
> > value of new *referenced-to* object. This happens in my_value_equal
> > (varobj.c):
> >
> > static int
> > my_value_equal (struct value *val1, struct value *volatile val2, int
> > *error2)
> > ...
>
> > ...Alas, quick attempt to do that results in segfault, and I'm out of
> > time for today. Feel free to beat me to it ;-)
>
> I think this patch works. My reasoning is one of symmetry: whatever is done to
> val2 should also be done to val1, and that you probably don't want to change
> the contents of val1 (hence val3). I don't know exactly what coerce_array
> does, apart from convert the type from TYPE_CODE_REF to TYPE_CODE_INT or
> TYPE_CODE_FLOAT or whatever, so the comment might not be quite
> right.
Is there any reason you declared a new variable instead of just saying:
val1 = coerce_array (val1)
? That would make the symmetry more apparent.
(I don't know enough about the context to review the patch more
substantially.)
next prev parent reply other threads:[~2006-05-08 17:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-03 23:05 Variable objects: references formatting Nick Roberts
2006-05-03 23:50 ` Jim Blandy
2006-05-04 1:53 ` Nick Roberts
2006-05-04 17:32 ` Jim Blandy
2006-05-04 22:30 ` Nick Roberts
2006-05-05 8:08 ` Jim Blandy
2006-05-04 5:30 ` Vladimir Prus
2006-05-04 6:21 ` Nick Roberts
2006-05-04 7:00 ` Vladimir Prus
2006-05-04 7:20 ` Nick Roberts
2006-05-04 12:10 ` Vladimir Prus
2006-05-08 12:41 ` [PATCH] -var-update [was Re: Variable objects: references formatting] Nick Roberts
2006-05-08 17:27 ` Jim Blandy [this message]
2006-05-08 21:17 ` Nick Roberts
2006-05-15 16:54 ` Daniel Jacobowitz
2006-05-17 0:45 ` Nick Roberts
2006-05-17 1:28 ` Daniel Jacobowitz
2006-05-17 1:43 ` Nick Roberts
2006-05-17 3:39 ` Daniel Jacobowitz
2006-05-19 7:41 ` [PATCH] -var-update Nick Roberts
2006-05-19 9:47 ` 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=vt2ac9s2zre.fsf@theseus.home. \
--to=jimb@codesourcery.com \
--cc=gdb-patches@sources.redhat.com \
--cc=ghost@cs.msu.su \
--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