Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Daniel Jacobowitz <drow@false.org>
Cc: Vladimir Prus <ghost@cs.msu.su>, gdb-patches@sources.redhat.com
Subject: Re: MI: fix base members in references
Date: Sun, 10 Dec 2006 21:20:00 -0000	[thread overview]
Message-ID: <17788.30961.422979.535189@kahikatea.snap.net.nz> (raw)
In-Reply-To: <20061210204207.GA1681@nevyn.them.org>

 > > > does the code you've added ever does anything?
 > > 
 > > It seems to handle variable objects of references to pointers correctly.
 > > Have you tried it?
 > 
 > I have not been able to follow this discussion, but there needs to be a
 > better level of understanding here.  Vlad's asking "why does this fix
 > the problem" and you're responding "it seems to fix the problem". 
 > Every time I see something like that, I assume the problem is only
 > being fixed by accident - I'm a big believer in understanding causes.

Looking at code is a bit like peeling an onion: when you remove one layer
there's another layer beneath.  Unfortunately I have to work within my
limitations, both temporal and mental, and I was just trying to get Vladimir to
do a sanity check.  It's easier to show code doesn't work than prove it does
and I don't follow his point about using value_type (var->value) instead of
var->type.  Surely if he thinks that there is a simpler/better patch then
the onus is on him to provide it?

 > get_type_deref looks at the type, and if it is a pointer or reference,
 > it dereferences it.  I assume that this is because we want to show the
 > children of pointers to structs and references to structs.  Is that
 > right?

My patch was just for references to pointers.

 > If you want to show the children of the struct given a reference to a
 > pointer to the struct, then it should handle that too.  Sounds like it
 > should check for a reference and _then_ for a pointer, instead of
 > checking at the same time.

I'm not thinking specifically of structs...

 > There are probably some missing calls to check_typedef here, too.  I
 > don't think you can have a typedef to a reference in C++, but you can
 > definitely have a typedef to a pointer, so it would probably be
 > advisable to call check_typedef before checking for TYPE_CODE_PTR.

...or typedefs.

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


  reply	other threads:[~2006-12-10 21:20 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
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
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

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=17788.30961.422979.535189@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=drow@false.org \
    --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