This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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: passing gdb.Value pointers to ctypes function calls


>>>>> "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


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