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: Mon, 11 Aug 2008 09:08:47 -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> C) Do what the language does: lookup field 'x' in the static type,
Paul> and only try dynamic type if the first lookup failed:
It occurred to me last night that we must be careful not to do this in
the overload resolution case. Looking at extra overloads from the
dynamic type will yield the wrong answer. I think these code paths
are separate in gdb, so that should not be a big deal, but I thought
it would be good to be explicit about it.
Tom