This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] 64-bit python support
- From: Ruben Van Boxem <vanboxem dot ruben at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org, mingw64 <mingw-w64-public at lists dot sourceforge dot net>
- Date: Tue, 10 May 2011 17:03:00 +0200
- Subject: Re: [PATCH] 64-bit python support
- References: <BANLkTi=2gphWs2p_5V+wTJMUAkjHDT79uQ__10646.2358417504$1305032253$gmane$org@mail.gmail.com> <m38vuesk7k.fsf@fleche.redhat.com> <BANLkTikrs+AFqqiQEwQfmD=c3wicjSdWYA__43532.2708603509$1305037944$gmane$org@mail.gmail.com> <m34o52sjrq.fsf@fleche.redhat.com>
- Reply-to: vanboxem dot ruben at gmail dot com
2011/5/10 Tom Tromey <tromey@redhat.com>:
>>>>>> "Ruben" == Ruben Van Boxem <vanboxem.ruben@gmail.com> writes:
>
> Ruben> Ah, I didn't know this, that's indeed very handy, but the two
> Ruben> occurrences in my patch are actually still a call to Py_InitModule
> Ruben> without the "4". Then that probably needs to be patched instead?
>
> No, there's a later define for that in modsupport.h:
>
> #define Py_InitModule(name, methods) \
> Â Â Â ÂPy_InitModule4(name, methods, (char *)NULL, (PyObject *)NULL, \
> Â Â Â Â Â Â Â Â Â Â Â PYTHON_API_VERSION)
>
> I think the thing to do is track down why the Python headers are picking
> the wrong function name for you.
>
> Tom
>
OK, found the problem. Apparantly the pyconfig.h header only defined
MS_WIN* when _MSC_VER is defined, which is obviously not the case for
mingw-w64. I guess people attempted fixing it here
(http://bugs.python.org/issue4709), but the patch never landed. Sorry
for the noise here. I'll just add "-DMS_WIN64" to the CFLAGS for GDB.
Pretty lame of Python devs though, with all the work put into the tiny
and overly correct patch. I'll ping them there and work around this
locally.
Thanks for the quick response here!
Ruben