Re: [PATCH v4] Make GDB compile with Python 3 on MinGW

Christian Biesinger via gdb-patches
2019-09-14T13:09:33Z

On Thu, Aug 22, 2019 at 6:47 PM Christian Biesinger
<cbiesinger@google.com> wrote:
>
> On Thu, Aug 22, 2019 at 5:24 PM Simon Marchi <simark@simark.ca> wrote:
> >
> > On 2019-08-15 2:49 p.m., Christian Biesinger via gdb-patches wrote:
> > > PyFile_FromString and PyFile_AsFile have been removed in Python 3.
> > > There is no obvious replacement that works here, and we can't just
> > > pass our FILE* to a DLL in Windows because it may use a different
> > > C runtime.
> > >
> > > So we just call a Python function which reads and executes file
> > > contents. Care must be taken to execute it in the context of
> > > __main__.
> > >
> > > Tested by inverting the ifdef and running the testsuite on Debian
> > > Linux (even without the patch, I failed at running the testsuite
> > > on Windows). I did test with both Python 2 and 3.
[...]
> > The patch LGTM with this fixed.
>
> Thanks, pushing now with that fixed.

Thinking about this patch -- is it worth a NEWS entry to mention that
gdb can now be compiled with Python 3 on Windows?

Christian