This is the mail archive of the
mailing list for the Archer project.
Re: [python][rfc] convert_value_from_python changes in pretty-printing
- From: Tom Tromey <tromey at redhat dot com>
- To: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- Cc: archer ml <archer at sourceware dot org>
- Date: Thu, 05 Feb 2009 13:17:38 -0700
- Subject: Re: [python][rfc] convert_value_from_python changes in pretty-printing
- References: <firstname.lastname@example.org>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Thiago" == Thiago Jung Bauermann <email@example.com> writes:
Thiago> Most callers were easy to adapt, but I'm not sure about the
Thiago> changes I made in pretty_print_one_value and print_children,
Thiago> could you take a look?
It looks like there is a lurking bug in pretty_print_one_value -- it
calls gdbpy_print_stack, but so does one of its callers,
I suggest removing the call from pretty_print_one_value and putting it
into its callers. WDYT?
Thiago> But the latter is less clear to me. It seems to me it expects
Thiago> a GDB exception to be thrown on error, so that's what I
Thiago> do. But maybe it would be better to just call
Thiago> gdbpy_print_stack and move on?
I think it is fine to call error here. My reasoning is that we would
like to avoid a cascade of errors when printing an array. Also, I
think Python errors here are bugs -- not some kind of ordinary
functioning. (If that turns out not to be true, we could do something
like introduce different exception classes for different cases, and
then ignore some failures but not others.)
Thiago> + error(_("Error while executing Python code."));
The space before the "(" is your nemesis :-)