RFC: prototype of C extensions using the Python limited API

Matthieu Longo matthieu.longo@arm.com
Thu Aug 20 13:59:07 GMT 2026


On 22/06/2026 11:24, Matthieu Longo via Gdb wrote:
> On 28/05/2026 17:24, Matthieu Longo via Gdb wrote:
>> Hi Tom,
>>
>> As I previously told you (at least, I believe so but I am not 100% sure), I finished migrating all
>> the Python C extensions some time ago. I had discovered some issues with a case of inheritance
>> causing unexpected crashes.
>> To facilitate the debugging, I decided to implement a prototype outside of GDB, and managed to make
>> it work. I finally got the prototype reviewed by Victor Stinner, a Python core developer, to double-
>> check whether my design was working as expected.
>>
>> Please find attached my last iteration. I also provided an archive which should be more convenient
>> for you if you want to compile and test it.
>>
>> Could you please review it so that we validate this new approach before I migrate all my previous
>> patches to it ?
>>
>> PS:
>> - a README is provided with all the needed instruction inside.
>> - this patch contains code from outside GDB's repository, and should not be merged inside GDB's
>> repository.
>>
>> Regards,
>> Matthieu
> 
> This might be easier to review.
> 
> Matthieu
Hi Tom,

I noticed that lately, Tom de Vries and you have been working on porting the existing Python C
extensions to use the Python safety API you proposed some time ago. That's good to see some progress
on this side as I might use some of the introduced structures into my patches.

However, those patches have created a significant amount of conflicts on my development branch.
And since I haven't heard of you for a while regarding this prototype, should I understand that you
would prefer to prioritize the migration to the safe API before the migration to the limited API ?

Also, do you think that it would be helpful to discuss over a zoom call the status of the limited
API migration, the prototype, and what is remaining to be done ?

Please, let me know about your thoughts.

Note: adding Tom de Vries in CC as he is working on the Python C extensions, and might be interested
in the discussion.

Regards,
Matthieu


More information about the Gdb mailing list