This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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][patch] PR pyton/11381


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


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