This is the mail archive of the mailing list for the Archer 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][rfc] convert_value_from_python changes in pretty-printing

>>>>> "Thiago" == Thiago Jung Bauermann <> 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 :-)


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