passing gdb.Value pointers to ctypes function calls
Tom Tromey
tromey@redhat.com
Wed Apr 13 14:26:00 GMT 2011
>>>>> "Christoph" == Christoph Mathys <eraserix@gmail.com> writes:
Christoph> I'm trying to write a pretty printer for gdb 7.2 using python, to be
Christoph> concrete I would like to print an Xml node (libxml2) as text. I've
Christoph> managed to get the pointers to node and document. Now I'm trying to
Christoph> call libxml using ctypes module, passing the pointer values as
Christoph> c_void_p. But gdb keeps crashing on me. Is this supposed to work at
Christoph> all?
Nope, this won't work.
A gdb.Value represents a value in the inferior. If you look at its
address, you are getting an address in some other process, not in gdb.
Tom
More information about the Gdb
mailing list