This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [python][patch] PR pyton/11381
- From: Tom Tromey <tromey at redhat dot com>
- To: Phil Muldoon <pmuldoon at redhat dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Fri, 09 Apr 2010 09:48:29 -0600
- Subject: Re: [python][patch] PR pyton/11381
- References: <4BBE1073.40703@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "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