This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] [patch] 'p->x' vs. 'p.x' and 'print object on'


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]