Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [python][patch] PR pyton/11381
Date: Fri, 09 Apr 2010 15:48:00 -0000	[thread overview]
Message-ID: <m3iq80ocdu.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4BBE1073.40703@redhat.com> (Phil Muldoon's message of "Thu, 08 	Apr 2010 18:20:51 +0100")

>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:

Phil> This patch address PR 11381. Briefly there are cases when only
Phil> children should be printed in a pretty-printer.  This patch allows the
Phil> printer's 'to_string' method to return the Python "None".  If this is
Phil> the case, the GDB pretty-printers will print nothing in place of
Phil> to_string and also alter the preceding text slightly, stripping off
Phil> leading spaces and the '=" text.

What should happen if to_string returns None but there is no children
method?

I think we should not worry about corner cases like this, but even so we
should explicitly decide that.

Does the varobj code do something sensible when to_string returns None?
I think there should be a test for this.

Phil> +  is_py_none = print_string_repr (printer, hint, stream, recurse, options, language,
Phil> +				 gdbarch);
Phil> +  print_children (printer, hint, stream, recurse, options, language, is_py_none);

These lines look like they wrap now.

Tom


  parent reply	other threads:[~2010-04-09 15:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 17:21 Phil Muldoon
2010-04-08 21:37 ` Eli Zaretskii
2010-04-09 15:48 ` Tom Tromey [this message]
2010-04-13 15:05   ` Phil Muldoon
2010-04-13 21:09     ` Tom Tromey

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=m3iq80ocdu.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@redhat.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