Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Variable objects: references formatting
Date: Thu, 04 May 2006 06:21:00 -0000	[thread overview]
Message-ID: <17497.40328.776132.200023@farnswood.snap.net.nz> (raw)
In-Reply-To: <200605040930.11191.ghost@cs.msu.su>

 > > Version 1.59 has been in the repository for over a month, so how come this
 > > patch is against 1.58?
 > 
 > I've at least 2 other changes to that file, and corresponding patches were 
 > neither applied nor rejected, AFAICT. I'd rather not update the file yet.

And I would think people on this mailing list would rather not work out
the patch relative to current CVS in order to apply.  I know it worked in
this case (after a shift) but it wouldn't in general.

 > > > diff -u -r1.58 varobj.c
 > > > @@ -2055,8 +2219,14 @@
 > >
 > > I'm not used to unified diffs, but as insertion appears to be done at the
 > > same place why is it not something like:
 > >
 > > @@ -2055,8 +2055,14 @@
 > 
 > I'm sorry, I don't understand that question. This hunk was cut from a larger 
 > diff, maybe that explains something?

Similarly, in general, the patch presumably won't apply properly.

 > > Most importantly, however, the preamble is about -data-evaluate-expression
 > > but AFAICS this doesn't call c_value_of_variable.
 > 
 > Sure it does. KDevelop uses -data-evaluate-expression to fetch values, and 
 > with this patch the value of "reference to structure" is rendered as "...", 
 > just like I'd want.

I could say "Oh know it doesn't!" but, since this is not a pantomime, could
you please give me a simple example of where it does call c_value_of_variable.
My loose reasoning is that the variable in "c_value_of_variable" refers to
variable object and -data-evaluate-expression doesn't use one.  What argument
do you give it?

 > > I have tested the output of -data-evaluate-expression on pointers to
 > > typedeffed structures and found that with the latter I get a {}-enclosed
 > > list of members with gcc 3.2 and {...} with gcc 4.1.  More generally, I
 > > have found that gcc 4.1 treats typedefs differently, which leads to errors
 > > with variable objects.
 > 
 > How *pointers* to typedeffed structures are relevant to this patch? Now, maybe 
 > we need to call 'check_typedef' in one more place -- after stripping 
 > reference, to make sure typedefs to structures are also rendered as "...".
 > 
 > Is that what you're saying? And what errors do you see with gcc 4.1?

No, I just didn't appreciate the difference between pointers and references in
GDB.  The discrepancy I "found" was due to me mistyping.  However I do see a
problem with gcc 4.1 and variable objects where GDB keeps telling me:

   Child of parent whose type does not allow children

when it didn't when my program was compiled with gcc 3.2.

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


  reply	other threads:[~2006-05-04  6:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-03 23:05 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 [this message]
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
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
  -- strict thread matches above, loose matches on Subject: below --
2006-05-03  9:22 Variable objects: references formatting Vladimir Prus
2006-05-03 17:50 ` Jim Blandy
2006-05-03 18:08   ` Jim Blandy
2006-05-04  5:19     ` Vladimir Prus
2006-05-04  6:08       ` Jim Blandy
2006-05-04  6:10         ` 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=17497.40328.776132.200023@farnswood.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --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