This is the mail archive of the archer@sourceware.org mailing list for the Archer 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: [python][rfc] Attempt to print the base class if a there is no Python pretty-printer for a derived class.


Paul Pluzhnikov wrote:
On Fri, Mar 27, 2009 at 10:34 AM, Tom Tromey <tromey@redhat.com> wrote:
"Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Looking pretty good :)

Phil> + /* Attempt to run the Python pretty-printers on the base class of
Phil> + the derived class. */

I can't tell whether the patch would work for 'class X: public Y ...'

It will. I really should have appended my working examples, but decided not too. I know better next time ;)


Also, here is an earlier thread on the same subject:
http://sourceware.org/ml/archer/2008-q4/msg00503.html


I've nothing really to add to what Tom already mentioned. But as printer selection criteria for a value is now pretty much deferred to the printers themselves, the circumstances discussed in that thread changed. In this case it was just easier to add a last-chance effort in the c++ class GDB printer itself. You can always write a base-class test which is more specialized in the Python printer by mining the fields for base classes.


Regards

Phil


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