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] Crash when using generators with Python 2.4

On Fri, Jan 16, 2009 at 3:23 PM, Paul Pluzhnikov <> wrote:

> On Fri, Jan 16, 2009 at 3:10 PM, Tom Tromey <> wrote:
>> If making a dummy frame is something supported by the Python C API,
> Yes.
>> 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.
> I'll try to do that soon.
> It appears fairly straightforward from the example Jeffry gave.


I am not sure I've followed all the coding conventions (which differ
between GDB and Python), please give it an "extra" look.

While attempting to verify that I didn't introduce any leaks,
I've discovered quite a few existing ones :-(

Has anyone tested pretty printers under Valgrind?

Attached is what I see under VG (with Python 2.4.5) from current
archer-tromey-python head.

Paul Pluzhnikov

2009-01-20  Paul Pluzhnikov  <>

	    * python/python-internal.h: include frameobject.h
	    * python/python.c (py_restore_tstate, getcode,
	      push_dummy_python_frame): New fn.
	    * python/python.c (print_children): Workaround
	      Python-2.4 generator bug.

Attachment: gdbpy-generator-20090120.txt
Description: Text document

Attachment: valgrind.out.txt
Description: Text document

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