Message ID | cfe9a625-551b-beba-5a77-96d21a84c010@redhat.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 86357 invoked by alias); 17 Mar 2017 15:00:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 86223 invoked by uid 89); 17 Mar 2017 15:00:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:2255 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Mar 2017 15:00:31 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5455B8048D; Fri, 17 Mar 2017 15:00:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5455B8048D Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5455B8048D Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9CE0062926; Fri, 17 Mar 2017 15:00:30 +0000 (UTC) Subject: Re: [PATCH] bound_registers.py: Add support for Python 3 To: Jonah Graham <jonah@kichwacoders.com> References: <20161120204526.7203-1-jonah@kichwacoders.com> <b5995c57-c724-3023-8814-b633d9d912e7@codesourcery.com> <CAPmGMvhcF2RyzyTtRbSsvcwwhcVCiFzi0kQu3qKx+Kb94++OqA@mail.gmail.com> <9c9ac6f4-1f6c-3ebe-b23d-3611f4f52192@codesourcery.com> <CAPmGMvid2z7rShFCTz8nHPrEJCAFXrfbHS+JTv4ATg8uNEoAPg@mail.gmail.com> <CAPmGMvjAAz8TeoiDJ5Fx2Cq8hyG8A+5zdWDYMprrbzQct=H1aw@mail.gmail.com> <3d3a1226-dbb2-04ef-c922-3462e6f318b3@codesourcery.com> <CAPmGMvgg0Kko+M7ki7QRDOTQAkj34QHr7PkgmOmkjauvp8r1YQ@mail.gmail.com> Cc: gdb-patches@sourceware.org From: Pedro Alves <palves@redhat.com> Message-ID: <cfe9a625-551b-beba-5a77-96d21a84c010@redhat.com> Date: Fri, 17 Mar 2017 15:00:28 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <CAPmGMvgg0Kko+M7ki7QRDOTQAkj34QHr7PkgmOmkjauvp8r1YQ@mail.gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit |
Commit Message
Pedro Alves
March 17, 2017, 3 p.m. UTC
On 03/08/2017 08:34 AM, Jonah Graham wrote: > On 26 November 2016 at 21:26, Luis Machado <lgustavo@codesourcery.com> wrote: >> On 11/26/2016 10:27 AM, Jonah Graham wrote: >>> Is there more I am supposed to do to get this patch into GDB? If so, >>> please advise and I would be happy to. >> >> >> One of the maintainers needs to OK it, which shouldn't that that long. Given >> the size of the patch, i don't there's anything else that should be done >> code-wise. >> > > Ping on this patch. Please let me know if there is anything else I can > do to get it in. > Thanks for the patch. I've pushed it in, as below. (I added the reference to printing.py to the commit log, and the PR number, so that the commit is logged in bugzilla automatically.) From 7503099f3e29739d34cb1224d54fba96404e6e61 Mon Sep 17 00:00:00 2001 From: Jonah Graham <jonah@kichwacoders.com> Date: Fri, 17 Mar 2017 14:57:44 +0000 Subject: [PATCH] Fix PR gdb/19637: bound_registers.py: Add support for Python 3 Fix this the same way gdb/python/lib/gdb/printing.py handles it. gdb/Changelog: 2017-03-17 Jonah Graham <jonah@kichwacoders.com> PR gdb/19637 * python/lib/gdb/printer/bound_registers.py: Add support for Python 3. --- gdb/ChangeLog | 6 ++++++ gdb/python/lib/gdb/printer/bound_registers.py | 5 +++++ 2 files changed, 11 insertions(+)
Comments
On Fri, Mar 17, 2017 at 3:00 PM, Pedro Alves <palves@redhat.com> wrote: > diff --git a/gdb/python/lib/gdb/printer/bound_registers.py b/gdb/python/lib/gdb/printer/bound_registers.py > index b315690..104ea7f 100644 > --- a/gdb/python/lib/gdb/printer/bound_registers.py > +++ b/gdb/python/lib/gdb/printer/bound_registers.py > @@ -16,6 +16,11 @@ > > import gdb.printing > > +if sys.version_info[0] > 2: > + # Python 3 removed basestring and long > + basestring = str > + long = int > + This change causes some fails in gdb.python/py-pp-maint.exp, disable pretty-printer^M 6 printers disabled^M 0 of 6 printers enabled^M (gdb) FAIL: gdb.python/py-pp-maint.exp: disable pretty-printer looks the number of pretty-printer is changed. Without this patch, there are 7 pretty-printers, info pretty-printer^M global pretty-printers:^M builtin^M mpx_bound128^M lookup_function_lookup_test^M pp-test^M enum flag_enum^M s^M ss^M struct s^M struct ss^M (gdb) PASS: gdb.python/py-pp-maint.exp: info pretty-printer but with this patch applied, it becomes 6, mpx_bound128 is disappeared. info pretty-printer^M global pretty-printers:^M builtin^M lookup_function_lookup_test^M pp-test^M enum flag_enum^M s^M ss^M struct s^M struct ss^M (gdb) PASS: gdb.python/py-pp-maint.exp: info pretty-printer I'll look into this problem further.
Hi, It looks like the wrong version of my patch was merged. Sorry if I didn't understand the proper process for providing an updated version of the patch. The initial version was missing the import sys, this is the correct one: https://sourceware.org/ml/gdb-patches/2016-11/msg00900.html Jonah ~~~ Jonah Graham Kichwa Coders Ltd. www.kichwacoders.com On 22 March 2017 at 09:16, Yao Qi <qiyaoltc@gmail.com> wrote: > On Fri, Mar 17, 2017 at 3:00 PM, Pedro Alves <palves@redhat.com> wrote: >> diff --git a/gdb/python/lib/gdb/printer/bound_registers.py b/gdb/python/lib/gdb/printer/bound_registers.py >> index b315690..104ea7f 100644 >> --- a/gdb/python/lib/gdb/printer/bound_registers.py >> +++ b/gdb/python/lib/gdb/printer/bound_registers.py >> @@ -16,6 +16,11 @@ >> >> import gdb.printing >> >> +if sys.version_info[0] > 2: >> + # Python 3 removed basestring and long >> + basestring = str >> + long = int >> + > > This change causes some fails in gdb.python/py-pp-maint.exp, > > disable pretty-printer^M > 6 printers disabled^M > 0 of 6 printers enabled^M > (gdb) FAIL: gdb.python/py-pp-maint.exp: disable pretty-printer > > looks the number of pretty-printer is changed. Without this patch, > there are 7 pretty-printers, > > info pretty-printer^M > global pretty-printers:^M > builtin^M > mpx_bound128^M > lookup_function_lookup_test^M > pp-test^M > enum flag_enum^M > s^M > ss^M > struct s^M > struct ss^M > (gdb) PASS: gdb.python/py-pp-maint.exp: info pretty-printer > > but with this patch applied, it becomes 6, mpx_bound128 is > disappeared. > > info pretty-printer^M > global pretty-printers:^M > builtin^M > lookup_function_lookup_test^M > pp-test^M > enum flag_enum^M > s^M > ss^M > struct s^M > struct ss^M > (gdb) PASS: gdb.python/py-pp-maint.exp: info pretty-printer > > I'll look into this problem further. > > -- > Yao (齐尧)
On Wed, Mar 22, 2017 at 9:37 AM, Jonah Graham <jonah@kichwacoders.com> wrote: > Hi, > > It looks like the wrong version of my patch was merged. Sorry if I > didn't understand the proper process for providing an updated version > of the patch. > > The initial version was missing the import sys, this is the correct > one: https://sourceware.org/ml/gdb-patches/2016-11/msg00900.html I pushed the missing bit in.
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d0d0f72..6d81cf5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2017-03-17 Jonah Graham <jonah@kichwacoders.com> + + PR gdb/19637 + * python/lib/gdb/printer/bound_registers.py: Add support for + Python 3. + 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com> * dwarf2loc.c (indirect_synthetic_pointer): Get data type of diff --git a/gdb/python/lib/gdb/printer/bound_registers.py b/gdb/python/lib/gdb/printer/bound_registers.py index b315690..104ea7f 100644 --- a/gdb/python/lib/gdb/printer/bound_registers.py +++ b/gdb/python/lib/gdb/printer/bound_registers.py @@ -16,6 +16,11 @@ import gdb.printing +if sys.version_info[0] > 2: + # Python 3 removed basestring and long + basestring = str + long = int + class MpxBound128Printer: """Adds size field to a mpx __gdb_builtin_type_bound128 type."""