From patchwork Fri Mar 17 15:00:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 19638 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: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 References: <20161120204526.7203-1-jonah@kichwacoders.com> <9c9ac6f4-1f6c-3ebe-b23d-3611f4f52192@codesourcery.com> <3d3a1226-dbb2-04ef-c922-3462e6f318b3@codesourcery.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: 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: On 03/08/2017 08:34 AM, Jonah Graham wrote: > On 26 November 2016 at 21:26, Luis Machado 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 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 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(+) 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 + + PR gdb/19637 + * python/lib/gdb/printer/bound_registers.py: Add support for + Python 3. + 2017-03-16 Andreas Arnez * 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."""