On Fri, 2011-06-24 at 12:51 -0600, Tom Tromey wrote:
I got this error:
../../archer/gdb/python/py-block.c: In function ‘gdbpy_block_for_pc’:
../../archer/gdb/python/py-block.c:306:25: error: Mismatching type in call to
PyArg_ParseTuple with format code "K" [-fpermissive]
argument 3 ("&pc") had type "gdb_py_ulongest *" (pointing to 64
bits)
but was expecting "long long unsigned int *" (pointing to 64 bits) for format
code "K"
But gdb_py_ulongest is a typedef:
typedef unsigned PY_LONG_LONG gdb_py_ulongest;
I didn't immediately see the problem looking at PyArg_ParseTuple.py.
Thanks for the report. I was able to reproduce this.
The type comparison function was being a bit too fussy requiring
identity of the underlying gcc.IntegerType instances.
Py_LONG_LONG is a bit fiddly: pyport.h can define it in a few different
ways.
So I've tried to make it a bit less fussy with these types, in this
commit (which also adds a minimal reproducer):
http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=a...
Hope this fixes it for you
Dave