From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44874 invoked by alias); 20 Nov 2016 20:51:14 -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 44863 invoked by uid 89); 20 Nov 2016 20:51:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.2 spammy=falls, printingpy, UD:printing.py, printing.py X-HELO: sasl.smtp.pobox.com Received: from pb-smtp2.pobox.com (HELO sasl.smtp.pobox.com) (64.147.108.71) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 20 Nov 2016 20:51:03 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 80E774F3E4 for ; Sun, 20 Nov 2016 15:51:01 -0500 (EST) Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 78D894F3E3 for ; Sun, 20 Nov 2016 15:51:01 -0500 (EST) Received: from mail-io0-f180.google.com (unknown [209.85.223.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 1358D4F3E2 for ; Sun, 20 Nov 2016 15:51:01 -0500 (EST) Received: by mail-io0-f180.google.com with SMTP id c21so25331464ioj.1 for ; Sun, 20 Nov 2016 12:51:01 -0800 (PST) X-Gm-Message-State: AKaTC00At1Zqf0j4qJSJwndAh1gMbcWNkd3oPF8RZdBx98faW+/c61zgNVyk4Z+xcv3wjD0mN/NCU0Zxt+Rr7g== X-Received: by 10.107.187.132 with SMTP id l126mr9808007iof.118.1479675060344; Sun, 20 Nov 2016 12:51:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.156.67 with HTTP; Sun, 20 Nov 2016 12:50:19 -0800 (PST) In-Reply-To: <20161120204526.7203-1-jonah@kichwacoders.com> References: <20161120204526.7203-1-jonah@kichwacoders.com> From: Jonah Graham Date: Sun, 20 Nov 2016 20:51:00 -0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] bound_registers.py: Add support for Python 3 To: gdb-patches@sourceware.org Content-Type: text/plain; charset=UTF-8 X-Pobox-Relay-ID: 0B807DA6-AF63-11E6-AAE8-3AB77A1B28F4-18936988!pb-smtp2.pobox.com X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00599.txt.bz2 Hi GDB devs, This patch fixes https://sourceware.org/bugzilla/show_bug.cgi?id=19637. This is my first patch to GDB, I hope it falls within the "Small changes can be accepted without a copyright assignment form on file." from the CONTRIBUTING file as the new code in this file was copied from printing.py as recommended in the bug report. In case it doesn't, and to cover future contributions, I have started the copyright assignment process. Thank you, Jonah ~~~ Jonah Graham Kichwa Coders Ltd. www.kichwacoders.com On 20 November 2016 at 20:45, Jonah Graham wrote: > gdb/Changelog: > > * python/lib/gdb/printer/bound_registers.py: Add support > for Python 3. > --- > gdb/ChangeLog | 5 +++++ > gdb/python/lib/gdb/printer/bound_registers.py | 5 +++++ > 2 files changed, 10 insertions(+) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 3797e8b..1923888 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,8 @@ > +2016-11-20 Jonah Graham > + > + * python/lib/gdb/printer/bound_registers.py: Add support > + for Python 3. > + > 2016-11-19 Joel Brobecker > > * contrib/ari/gdb_ari.sh: Add detection of printf_vma and > diff --git a/gdb/python/lib/gdb/printer/bound_registers.py b/gdb/python/lib/gdb/printer/bound_registers.py > index 9ff94aa..e91cc19 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.""" > > -- > 2.10.1 >