From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Simon Marchi <simark@simark.ca>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v4] Make GDB compile with Python 3 on MinGW
Date: Thu, 22 Aug 2019 22:48:00 -0000 [thread overview]
Message-ID: <CAPTJ0XEiNJLii-YyUeGfVjiCAwRLZeh97TkmBWA9rq8kWNwBBw@mail.gmail.com> (raw)
In-Reply-To: <fae5cc75-2901-89ab-acb1-986c836190dc@simark.ca>
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.
> >
> > gdb/ChangeLog:
> >
> > 2019-08-13 Christian Biesinger <cbiesinger@google.com>
> >
> > * python/lib/gdb/__init__.py: Add an execute_file function.
>
> This can be written as:
>
> * python/lib/gdb/__init__.py (_execute_file): New function.
>
> > * python/python.c (python_run_simple_file): Call gdb.execute_file
> > on Windows.
>
> Please update "execute_file" to "_execute_file" in both entries.
>
> The patch LGTM with this fixed.
Thanks, pushing now with that fixed.
Christian
next prev parent reply other threads:[~2019-08-22 22:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-14 0:05 [PATCH] " Christian Biesinger via gdb-patches
2019-08-14 16:06 ` [PATCH v2] " Christian Biesinger via gdb-patches
2019-08-15 2:58 ` Simon Marchi
2019-08-15 17:15 ` Christian Biesinger via gdb-patches
2019-08-15 17:15 ` [PATCH] " Christian Biesinger via gdb-patches
2019-08-15 17:42 ` [PATCH v3] " Christian Biesinger via gdb-patches
2019-08-15 18:02 ` Pedro Alves
2019-08-15 18:50 ` Christian Biesinger via gdb-patches
2019-08-15 18:49 ` [PATCH v4] " Christian Biesinger via gdb-patches
2019-08-22 20:48 ` [PING] " Christian Biesinger via gdb-patches
2019-08-22 22:24 ` Simon Marchi
2019-08-22 22:48 ` Christian Biesinger via gdb-patches [this message]
2019-09-14 13:09 ` Christian Biesinger via gdb-patches
2019-09-14 13:30 ` Eli Zaretskii
2019-09-14 20:43 ` [PATCH] Add a NEWS entry that gdb can be compiled with py3 on Windows Christian Biesinger via gdb-patches
2019-09-15 2:34 ` Eli Zaretskii
2019-09-15 2:42 ` Christian Biesinger via gdb-patches
2019-08-15 18:25 ` [PATCH v2] Make GDB compile with Python 3 on MinGW Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPTJ0XEiNJLii-YyUeGfVjiCAwRLZeh97TkmBWA9rq8kWNwBBw@mail.gmail.com \
--to=gdb-patches@sourceware.org \
--cc=cbiesinger@google.com \
--cc=simark@simark.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox