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

Tom Tromey tromey@redhat.com
Thu Aug 7 17:31:00 GMT 2008


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



More information about the Gdb-patches mailing list