From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3776 invoked by alias); 1 Jun 2018 11:56:30 -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 3759 invoked by uid 89); 1 Jun 2018 11:56:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=2x, phil, UD:2.x X-HELO: mail-wm0-f53.google.com Received: from mail-wm0-f53.google.com (HELO mail-wm0-f53.google.com) (74.125.82.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Jun 2018 11:56:26 +0000 Received: by mail-wm0-f53.google.com with SMTP id r15-v6so2542118wmc.1 for ; Fri, 01 Jun 2018 04:56:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=b7dzD4W1BKgINDEHlg1VHQRmI2c7hUlf8XqR2H4beNg=; b=IbnJJyi67B9Tr1BXP5mHYv7OcwBbQzMij9NgG23Y33QRdJ/HE++nLw7+6xKxjG/3CN r7BSr+PmD4jZCCYObCOxuZQIcXCY8OKRmCbiR/FUCZ7ipD1ULmohkoHLf5YSZFVpKu+d nSyxGBoPzv9NKau2im7QHbzOpWTUV0c5mIS13myZp11j5CQZSuORZiDPK7jUeWqglFno rDHXKfoEUvGoYRSbjataQGifAMnrgahzbPkKGjDybHvaa2XfdIhR9ksETg5NUYZKmOLI AivXaJdlOya/EPDrOc3ViLqRC4x7TZYeMwcrCwd4y04VAoJN9lOTx67bBc9LoO7ru7pr Tvew== X-Gm-Message-State: ALKqPwcSaWyNPCyjK0O/g4WaQ5Kfw8YfhIrwzNgIr+Nb80gQU6JYIP0B mN4CClb8FD+6ThH9uaRc7tbLVTTxbJ0= X-Google-Smtp-Source: ADUXVKLOlg3W1i85ZCTxykKtTeykoDLs3jXV4wzyic17AwI7haMwXay75Jnlqf7X7B1x5RkJgQVn6Q== X-Received: by 2002:a1c:a010:: with SMTP id j16-v6mr2373895wme.61.1527854184495; Fri, 01 Jun 2018 04:56:24 -0700 (PDT) Received: from ?IPv6:2a02:c7f:ae6a:ed00:4685:ff:fe66:9f4? ([2a02:c7f:ae6a:ed00:4685:ff:fe66:9f4]) by smtp.gmail.com with ESMTPSA id r5-v6sm20287443wrp.59.2018.06.01.04.56.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jun 2018 04:56:23 -0700 (PDT) Subject: Re: [PATCH] fix build failure with Python 3.7 To: Sergio Durigan Junior , Paul.Koning@dell.com Cc: gdb-patches@sourceware.org References: <96198491-96D8-42F0-9956-1C2BC9277050@dell.com> <87fu27fux2.fsf@redhat.com> <2BFDF702-C2E4-4339-ABB4-D0655063DE95@dell.com> <87d0xb34jw.fsf@redhat.com> From: Phil Muldoon Message-ID: <54c06041-b5f2-83b9-2179-40996225fa7e@redhat.com> Date: Fri, 01 Jun 2018 11:56:00 -0000 MIME-Version: 1.0 In-Reply-To: <87d0xb34jw.fsf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00006.txt.bz2 On 31/05/18 22:20, Sergio Durigan Junior wrote: > On Thursday, May 31 2018, Paul Koning wrote: > >>> On May 31, 2018, at 4:10 PM, Sergio Durigan Junior wrote: >>> >>>> >>>> gdb/ChangeLog: >>>> >>>> 2018-05-31 Paul Koning >>>> >>>> PR gdb/33470 >>> >>> This bug number is actually from Python's bugzilla, not GDB's. So it's >>> not correct to mention it here in the ChangeLog/commit message. AFAIK, >>> there's no correspondent GDB bug filed for this issue. >> >> Ok, I removed that. >> >>> >>>> * python/python.c (do_start_initialization): >>>> Avoid call to internal Python API. >>>> (PyInit__gdb): New function. >>>> >>>> diff --git a/gdb/python/python.c b/gdb/python/python.c >>>> index c29e7d7a6b..89443aee25 100644 >>>> --- a/gdb/python/python.c >>>> +++ b/gdb/python/python.c >>>> @@ -1667,6 +1667,14 @@ finalize_python (void *ignore) >>>> restore_active_ext_lang (previous_active); >>>> } >>>> >>>> +#ifdef IS_PY3K >>>> +PyMODINIT_FUNC >>>> +PyInit__gdb (void) >>>> +{ >>>> + return PyModule_Create (&python_GdbModuleDef); >>>> +} >>>> +#endif >>> >>> I think it's a good idea to add a comment to this function. >> >> I added this (after the #ifdef): >> >> /* This is called via the PyImport_AppendInittab mechanism called >> during initialization, to make the built-in _gdb module known to >> Python. */ > > Thanks. > > FWIW, I ran the full testsuite here and no regressions were found. > Hey Sergio, Thanks for doing this. Did you test it against a GDB built against 3.7 and a GDB build with a 2.x version of Python? Cheers Phil