From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74800 invoked by alias); 7 Mar 2017 13:38:26 -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 74778 invoked by uid 89); 7 Mar 2017 13:38:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=chose, H*r:169.254.4, Tel, tel X-HELO: mga11.intel.com Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Mar 2017 13:38:24 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2017 05:38:23 -0800 X-ExtLoop1: 1 Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2017 05:38:22 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.38]) by IRSMSX151.ger.corp.intel.com ([169.254.4.20]) with mapi id 14.03.0248.002; Tue, 7 Mar 2017 13:38:21 +0000 From: "Wiederhake, Tim" To: Joel Brobecker , "Jose E. Marchesi" CC: Yao Qi , "gdb-patches@sourceware.org" Subject: RE: MemoryView missing from Python 2.4 and 2.6 Date: Tue, 07 Mar 2017 13:38:00 -0000 Message-ID: <9676A094AF46E14E8265E7A3F4CCE9AF9428CB@irsmsx105.ger.corp.intel.com> References: <87o9xsx38r.fsf@oracle.com> <20170223225946.snir4ab6twc7vo7n@localhost> <9676A094AF46E14E8265E7A3F4CCE9AF9417D1@irsmsx105.ger.corp.intel.com> <86h93j7evn.fsf@gmail.com> <9676A094AF46E14E8265E7A3F4CCE9AF941DE1@irsmsx105.ger.corp.intel.com> <87wpca8onq.fsf@oracle.com> <20170307002119.ri3xv4cfxfkrb4gm@adacore.com> In-Reply-To: <20170307002119.ri3xv4cfxfkrb4gm@adacore.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00065.txt.bz2 Hi Joel! > It looks like the patch is also removing the feature from users of > Python 2.7.x, though, is it not? The patch (see https://sourceware.org/ml/gdb-patches/2017-03/msg00039.html) does not remove any feature. The patch changes the return type of one func= tion from "memoryview" to "buffer" for Python 2.7 and below. Both types support= the "in" keyword, indexed access, length etc. and behave very similar. Granted, memoryview has some additional functions that lets the user inspect the str= ide and size of the elements in the buffer, but this is a feature we do not use here anyway. I chose 2.7 as a parting point because that is how it is handled in infpy_read_memory in py-inferior.c. Personally, I would leave it that way because with "buffer" exposed with Python 2.7 as well as Python 2.6 and bel= ow, I guess it gets more exposure and testing and won't suffer bit-rot as easil= y. The patch is tested with Python 2.7 and Python 3.6. I cannot test it with Python 2.6 but that should not be necessary as these two versions already c= heck both different return types. Tim > -----Original Message----- > From: Joel Brobecker [mailto:brobecker@adacore.com] > Sent: Tuesday, March 7, 2017 1:21 AM > To: Jose E. Marchesi > Cc: Wiederhake, Tim ; Yao Qi > ; gdb-patches@sourceware.org > Subject: Re: MemoryView missing from Python 2.4 and 2.6 >=20 > Hello, >=20 > > Jose, can you confirm that this patch un-breaks GDB linked with > > Python 2.6? > > > > Yep. This fixes the build with Python 2.6.6. >=20 > It looks like the patch is also removing the feature from users of Python= 2.7.x, > though, is it not? Given that this is a new feature, this wouldn't be the= end of > the world, especially since we're so close to branching, so we wouldn't w= ant > that to be a reason to delay the fix too much longer. However, I think our > configure script defines HAVE_LIBPYTHON2_7, so perhaps we could either > use that, or explicitly exclude HAVE_LIBPYTHON2_6, HAVE_LIBPYTHON2_5 > and HAVE_LIBPYTHON2_4 instead of only including it for Python 3.x? >=20 > -- > Joel Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928