Re: Debugging Python C extensions with GDB

2022-11-15 Thread Barry
out a specific use of gdb for python c extensions. Barry > > > Nov 14, 2022, 14:32 by ba...@barrys-emacs.org: > > On 14 Nov 2022, at 19:10, Jen Kris via Python-list > wrote: > > In September 2021, Victor Stinner wrote “Debugging Python C extensions with > GDB”

Re: Debugging Python C extensions with GDB

2022-11-14 Thread Jen Kris via Python-list
;> In September 2021, Victor Stinner wrote “Debugging Python C extensions with >> GDB” >> (https://developers.redhat.com/articles/2021/09/08/debugging-python-c-extensions-gdb#getting_started_with_python_3_9). >> >> >> My question is: with Python 3.9+, can I

Re: Debugging Python C extensions with GDB

2022-11-14 Thread Barry
> On 14 Nov 2022, at 19:10, Jen Kris via Python-list > wrote: > > In September 2021, Victor Stinner wrote “Debugging Python C extensions with > GDB” > (https://developers.redhat.com/articles/2021/09/08/debugging-python-c-extensions-gdb#getting_started_with_python_

Debugging Python C extensions with GDB

2022-11-14 Thread Jen Kris via Python-list
In September 2021, Victor Stinner wrote “Debugging Python C extensions with GDB” (https://developers.redhat.com/articles/2021/09/08/debugging-python-c-extensions-gdb#getting_started_with_python_3_9).   My question is:  with Python 3.9+, can I debug into a C extension written in pure C and

Re: Python C Extensions

2011-02-24 Thread MRAB
On 24/02/2011 16:46, aken8...@yahoo.com wrote: Thank you very much, it worked. I thought the PyDict_SetItem should assume ownership of the passed object and decrease it's reference count (I do not know why). Does this also go for the Lists ? Should anything inserted into list also be DECRED-ed ?

Re: Python C Extensions

2011-02-24 Thread Carl Banks
On Feb 24, 8:46 am, "aken8...@yahoo.com" wrote: > Thank you very much, it worked. > I thought the PyDict_SetItem should assume ownership > of the passed object and decrease it's reference count (I do not know > why). > > Does this also go for the Lists ? Should anything inserted into list > also >

Re: Python C Extensions

2011-02-24 Thread aken8...@yahoo.com
Thank you very much, it worked. I thought the PyDict_SetItem should assume ownership of the passed object and decrease it's reference count (I do not know why). Does this also go for the Lists ? Should anything inserted into list also be DECRED-ed ? Thank you again for reply. On Feb 24, 11:33 am

Re: Python C Extensions

2011-02-24 Thread MRAB
On 24/02/2011 16:01, aken8...@yahoo.com wrote: Hi, I have a memory leak problem with my "C" extension module. My C module returns large dictionaries to python, and the dictionaries never get deleted, so the memory for my program keeps growing. I do not know how to delete the dictionary object a

Python C Extensions

2011-02-24 Thread aken8...@yahoo.com
Hi, I have a memory leak problem with my "C" extension module. My C module returns large dictionaries to python, and the dictionaries never get deleted, so the memory for my program keeps growing. I do not know how to delete the dictionary object after it becomes irrelevant. I do not know if the

Re: How run valgrind on Python C extensions?

2005-02-02 Thread System Administrator
Chris> I have Python C extensions that are giving me seg faults that I'd Chris> like to run valgrind on. Chris> Can I use valgrind on these through python?? HOW??? Just run Python under valgrind's control. It will automatically take care of it for you. C

How run valgrind on Python C extensions?

2005-02-01 Thread [EMAIL PROTECTED]
I have Python C extensions that are giving me seg faults that I'd like to run valgrind on. Can I use valgrind on these through python?? HOW??? Is it easy or must I do some work like recompiling python source with the -g extension? Thanks! Chris -- http://mail.python.org/mailman/lis