From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66629 invoked by alias); 14 Sep 2019 13:09:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 66594 invoked by uid 89); 14 Sep 2019 13:09:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.2 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=Simon, HTo:D*ca, marchi, H*f:sk:CAPTJ0X X-HELO: mail-ot1-f67.google.com Received: from mail-ot1-f67.google.com (HELO mail-ot1-f67.google.com) (209.85.210.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 14 Sep 2019 13:09:31 +0000 Received: by mail-ot1-f67.google.com with SMTP id s28so31886420otd.4 for ; Sat, 14 Sep 2019 06:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qVqouCUvefPkfuVI1YJ4ja8VhXKWFfHT7j9mJnTPL5k=; b=ueZRZgswxeG3epXGSOlF8ctsXb2L1/og0gCawhXrD71XzTo7lPSozD1nXZ+1VJdZGW JaDMWIpljzB/OKEG4TXU5v8zTrZmVrb716T3JppVcplEm0PRXgdpF6PuLl0HXWjeTYzy b2+zh84NWBnOWNKvNd5iGKeLe4xtSc0fxGpxoqVGSaYMbLcb/RwdX5KlLfOPoaUs9bC5 7VerA7xashdr7/xWXOFttSsnKPunIXaqgb3+5nUVMbXOFRBd88bdvx3HJhGW0ZUvFCuG MFXWRC8d0bN8dwzpYYMbhM5/AbUlKsk2BxHZl3b0U1A3gs9n8M+C3mMRgtXloZcAjdZu U3nQ== MIME-Version: 1.0 References: <20190815184942.19371-1-cbiesinger@google.com> In-Reply-To: From: "Christian Biesinger via gdb-patches" Reply-To: Christian Biesinger Date: Sat, 14 Sep 2019 13:09:00 -0000 Message-ID: Subject: Re: [PATCH v4] Make GDB compile with Python 3 on MinGW To: Simon Marchi Cc: gdb-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00252.txt.bz2 On Thu, Aug 22, 2019 at 6:47 PM Christian Biesinger wrote: > > On Thu, Aug 22, 2019 at 5:24 PM Simon Marchi 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