Re: [RFA] 12843

André Pönitz
2011-08-31T08:54:30Z

On Tuesday 30 August 2011 19:20:58 ext Tom Tromey wrote:
> >>>>> "André" == André Pönitz <andre.poenitz@nokia.com> writes:
>
> Tom> Do you generate MI-compliant output from Python? I'm curious.
>
> André> Sort of. Originally it was fully compliant, then extra fields had been
> André> added and additional commas became "legal" (to save a few cycles
> André> for the check whether they are necessary). But it's still pretty MI-ish.
>
> I ask because I occasionally wonder whether it would be useful to add
> support for converting (a subset of) Python objects to MI.
>
> Phil might need it for breakpoint_ops; but I think we were thinking in
> terms of a one-off, where a generic facility might be better.

Having a generic way to serialize gdb's python objects to MI might
be convenient. On the other hand that's generally not too difficult
to do "manually" for some specific case.

It might be also interesting from a performance point of view,
especially if this would be usable for lots of items.

I am not sure how much of a difference this would make, though,
but allowing the "sloppy" commas I mentioned certainly made a
difference, so I guess there's some general potential to gain a
few cycles by doing the formatting in C and not in Python.

Andre'