public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: Phil Muldoon <pmuldoon@redhat.com>,
	Project Archer <archer@sourceware.org>
Subject: Re: [python][rfc] Attempt to print the base class if a there is no  Python pretty-printer for a derived class.
Date: Fri, 27 Mar 2009 18:00:00 -0000	[thread overview]
Message-ID: <m3ocvmsv6n.fsf@fleche.redhat.com> (raw)
In-Reply-To: <8ac60eac0903271045o2e7df3a2o416178504435fbd4@mail.gmail.com> (Paul Pluzhnikov's message of "Fri\, 27 Mar 2009 10\:45\:54 -0700")

>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

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

It will.

gdb today has some special code for printing C++ classes.  This code
first recurses into base classes, then prints the derived class' fields.

What Phil's patch does is hook into this to try to pretty-print a base
class.  So, it should apply generally.

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

Now that pretty-printers are not registered by type, I think the patch
in this thread won't work as-is.  A given printer can still be made
completely generic, though, if that is what you want; it just has to
look at the base classes itself.

Tom

  reply	other threads:[~2009-03-27 18:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27 17:05 Phil Muldoon
2009-03-27 17:34 ` Tom Tromey
2009-03-27 17:43   ` Phil Muldoon
2009-03-27 17:47     ` Tom Tromey
2009-03-27 17:46   ` Paul Pluzhnikov
2009-03-27 18:00     ` Tom Tromey [this message]
2009-03-27 18:28     ` Phil Muldoon
2009-03-27 17:43 ` Pedro Alves
2009-03-27 17:50   ` Tom Tromey
2009-03-27 18:05     ` Pedro Alves
2009-03-27 18:36       ` Tom Tromey
2009-03-27 19:08       ` Phil Muldoon
2009-03-27 19:25         ` Pedro Alves
2009-03-27 18:05     ` Phil Muldoon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3ocvmsv6n.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=archer@sourceware.org \
    --cc=pmuldoon@redhat.com \
    --cc=ppluzhnikov@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).