From: Tom Tromey <tromey@redhat.com>
To: ppluzhnikov@google.com (Paul Pluzhnikov)
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] [patch] 'p->x' vs. 'p.x' and 'print object on'
Date: Tue, 22 Jul 2008 00:53:00 -0000 [thread overview]
Message-ID: <m3mykapwo5.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20080717214839.6AE253A67B6@localhost> (Paul Pluzhnikov's message of "Thu\, 17 Jul 2008 14\:48\:39 -0700 \(PDT\)")
>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:
Paul> Long time GDB users are somewhat used to 'p->x' and 'p.x' meaning
Paul> the same thing. But, as test case below demonstrates, they don't
Paul> mean the same thing when 'set print object on' is in effect.
FWIW, I like this. I was always confused when I printed an object and
saw a field, but was then unable to print the field directly.
However, I recall bringing this up once, in the distant past. Someone
pointed out a difficulty with this approach: there might be one field
'x' that would be used with the declared type, but another field, also
named 'x', that would be used with the actual type. So, this could
potentially be confusing (albeit in an already confusing situation).
Maybe this can be documented or otherwise resolved.
Also, IMO this patch could use an associated test case.
Tom
next prev parent reply other threads:[~2008-07-22 0:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 21:49 Paul Pluzhnikov
2008-07-22 0:53 ` Tom Tromey [this message]
2008-07-30 17:51 ` Paul Pluzhnikov
2008-08-07 17:31 ` Tom Tromey
2008-08-07 20:20 ` Daniel Jacobowitz
2008-08-11 15:09 ` Tom Tromey
2008-08-19 18:05 ` Paul Pluzhnikov
2008-08-26 16:45 ` Paul Pluzhnikov
2008-10-22 22:32 ` Ulrich Weigand
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=m3mykapwo5.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=ppluzhnikov@google.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