This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: passing gdb.Value pointers to ctypes function calls
- From: Tom Tromey <tromey at redhat dot com>
- To: Christoph Mathys <eraserix at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 13 Apr 2011 08:26:30 -0600
- Subject: Re: passing gdb.Value pointers to ctypes function calls
- References: <BANLkTimYpcNe63aXb7rabE-ziWaDrXN+kA@mail.gmail.com>
>>>>> "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