Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@codesourcery.com>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Vladimir Prus <vladimir@codesourcery.com>,
	 gdb-patches@sources.redhat.com,
		  Vladimir Prus <ghost@cs.msu.su>
Subject: Re: MI: fix base members in references
Date: Tue, 05 Dec 2006 22:27:00 -0000	[thread overview]
Message-ID: <m3lklmvuz4.fsf@codesourcery.com> (raw)
In-Reply-To: <20061205214654.GA29947@nevyn.them.org> (Daniel Jacobowitz's message of "Tue, 5 Dec 2006 16:46:54 -0500")


Daniel Jacobowitz <drow@false.org> writes:
> On Wed, Dec 06, 2006 at 10:21:06AM +1300, Nick Roberts wrote:
>> The comment in varobj.c refers to "Baseclass" and I presume the original author
>> included the case
>> 
>>   TYPE_CODE (value_type (parent->value)) == TYPE_CODE_REF
>> 
>> for a specific reason.
>
> Probably, but as Vlad's explanation is correct, either the original
> author was wrong or the behavior of value_ind has changed.  Something
> in this code should change, but see below.
>
> On Tue, Dec 05, 2006 at 01:33:12PM -0800, Jim Blandy wrote:
>> (By the way --- it's handy to include a link to the post with the
>> patch, or ideally the patch itself.)
>
> Is a threading mailer really so much to ask? :-)

*blush*  (ding) Gnus is amazingly slow at finding parent messages.

>> How should this behave if parent->value is a reference to a pointer?
>> Shouldn't it follow the ref, and then behave the same as when it's a
>> pointer?  If so, then the fix would be something like this instead
>> (not that I understand this code):
>
> If this is always the same values affected by Vlad's other patch which
> calls coerce_ref when setting the value, then maybe we should just be
> asserting there is no reference here after that patch.
>
>> --- 2426,2439 ----
>>   	  /* Baseclass */
>>   	  if (parent->value != NULL)
>>   	    {
>> ! 	      struct value *temp = coerce_ref (parent->value);
>>   
>> ! 	      if (TYPE_CODE (value_type (temp)) == TYPE_CODE_PTR
>> ! 		  || TYPE_CODE (value_type (temp)) == TYPE_CODE_REF)
>>   		{
>> ! 		  if (!gdb_value_ind (temp, &temp))
>>   		    return NULL;
>
> In any case, you can drop the TYPE_CODE_REF check if you do it this
> way.

Oh, yes --- I meant to drop the TYPE_CODE_REF case.


  reply	other threads:[~2006-12-05 22:27 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 12:56 Vladimir Prus
2006-12-05 13:23 ` Vladimir Prus
2006-12-05 21:32   ` Jim Blandy
2006-12-05 20:59     ` Nick Roberts
2006-12-05 21:12       ` Daniel Jacobowitz
2006-12-05 21:25         ` Nick Roberts
2006-12-05 21:47           ` Daniel Jacobowitz
2006-12-05 22:27             ` Jim Blandy [this message]
2006-12-06  8:44             ` Vladimir Prus
2006-12-07  2:22             ` Nick Roberts
2006-12-07  5:24               ` Nick Roberts
2006-12-07  6:22                 ` Vladimir Prus
2006-12-07  6:53                   ` Vladimir Prus
2006-12-07 10:36                   ` Nick Roberts
2006-12-08 12:53                     ` Vladimir Prus
2006-12-09 22:10                     ` Vladimir Prus
2006-12-05 20:45 ` Daniel Jacobowitz
2006-12-06  9:04   ` Vladimir Prus
2006-12-06 20:29     ` Joel Brobecker
2006-12-06 20:33       ` Vladimir Prus
2006-12-09 21:27 Nick Roberts
2006-12-09 21:38 ` Vladimir Prus
2006-12-09 21:50   ` Nick Roberts
2006-12-09 22:15     ` Vladimir Prus
2006-12-10  4:19       ` Nick Roberts
2006-12-10 11:24         ` Vladimir Prus
2006-12-10 20:09           ` Nick Roberts
2006-12-10 20:42         ` Daniel Jacobowitz
2006-12-10 21:20           ` Nick Roberts
2006-12-11  2:35             ` Daniel Jacobowitz
2006-12-11  5:58               ` Nick Roberts
2006-12-11  7:22                 ` Vladimir Prus
2006-12-11  8:03                   ` Nick Roberts

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=m3lklmvuz4.fsf@codesourcery.com \
    --to=jimb@codesourcery.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    --cc=nickrob@snap.net.nz \
    --cc=vladimir@codesourcery.com \
    /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