This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] [patch] 'p->x' vs. 'p.x' and 'print object on'
- From: Tom Tromey <tromey at redhat dot com>
- To: "Paul Pluzhnikov" <ppluzhnikov at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 07 Aug 2008 11:31:14 -0600
- Subject: Re: [RFC] [patch] 'p->x' vs. 'p.x' and 'print object on'
- References: <20080717214839.6AE253A67B6@localhost> <m3mykapwo5.fsf@fleche.redhat.com> <8ac60eac0807301050id1051q8072925c0d11b96d@mail.gmail.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:
Paul> Thanks for bringing that up. I've modified the test case to have
Paul> a field 'y' in both the base and derived classes (attached at the
Paul> end), and the current situation is (IMHO) just as confusing before
Paul> the patch as it is after :(
Thanks for doing this.
Paul> C) Do what the language does: lookup field 'x' in the static type,
Paul> and only try dynamic type if the first lookup failed:
Paul> I think "C" is the least confusing alternative.
Paul> It may actually be good to do "C" independent of the 'print object'
Paul> setting.
I agree. This does sound better.
Paul> Yes, I just wanted to see what people think about this before
Paul> creating the test case.
FWIW I'm definitely in favor.
Tom