This is the mail archive of the archer@sourceware.org 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] Crash when using generators with Python 2.4


>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> A. somehow push a "dummy" Python frame before calling next() on
Paul>    the iterator returned from children() [I don't know how exactly to
Paul>    do that], or
Paul> B. disallow generators as return from children() if GDB was built
Paul>    with Python 2.4 [I believe I know how to do that.]

Paul> A) has the advantage that the same pretty printers will work
Paul> regardless of which Python was used; but it is more of a hack.

Paul> Comments?

If making a dummy frame is something supported by the Python C API,
then I would prefer that.  Using a generator in a pretty-printer seems
like a fairly reasonable thing for users to do.

BTW, now would be a very good time to implement this.  I would like to
start sending more pretty-printing patches upstream as soon as I'm
done with my current patch.

Tom


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