passing gdb.Value pointers to ctypes function calls

Tom Tromey tromey@redhat.com
Wed Apr 13 14:27:00 GMT 2011


>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:

>> I'm trying to write a pretty printer for gdb 7.2 using python, to be
>> concrete I would like to print an Xml node (libxml2) as text. I've
>> managed to get the pointers to node and document. Now I'm trying to
>> call libxml using ctypes module, passing the pointer values as
>> c_void_p. But gdb keeps crashing on me.

Phil> If GDB ever crashes it is a bug.  Can you file a bug for this?  

Usually this is true, but ctypes is special.  It lets you make pretty
much unrestricted C calls from Python.  We can't guard against all of
those.

Tom



More information about the Gdb mailing list