From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108379 invoked by alias); 26 Nov 2016 18:55:55 -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 107083 invoked by uid 89); 26 Nov 2016 18:55:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=1415 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; Sat, 26 Nov 2016 18:55:44 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 83987504B4; Sat, 26 Nov 2016 13:55:43 -0500 (EST) Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 7BBD4504B3; Sat, 26 Nov 2016 13:55:43 -0500 (EST) Received: from localhost.localdomain (unknown [188.221.161.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id BCF1F504B2; Sat, 26 Nov 2016 13:55:42 -0500 (EST) From: Jonah Graham To: gdb-patches@sourceware.org Cc: Jonah Graham Subject: [PATCH] bound_registers.py: Add support for Python 3 Date: Sat, 26 Nov 2016 18:55:00 -0000 Message-Id: <20161126185435.12434-1-jonah@kichwacoders.com> In-Reply-To: References: X-Pobox-Relay-ID: EE723A50-B409-11E6-AAA3-B2917B1B28F4-18936988!pb-smtp2.pobox.com X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00900.txt.bz2 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 | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 745ab7b..7bf79e1 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-26 Simon Marchi * ui-out.h (struct ui_out_impl): Remove comment. diff --git a/gdb/python/lib/gdb/printer/bound_registers.py b/gdb/python/lib/gdb/printer/bound_registers.py index 9ff94aa..50509fb 100644 --- a/gdb/python/lib/gdb/printer/bound_registers.py +++ b/gdb/python/lib/gdb/printer/bound_registers.py @@ -14,8 +14,15 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +import sys + 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.2