From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5244 invoked by alias); 22 Mar 2017 09:38:40 -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 5158 invoked by uid 89); 22 Mar 2017 09:38:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.2 spammy=coders X-HELO: sasl.smtp.pobox.com Received: from pb-smtp1.pobox.com (HELO sasl.smtp.pobox.com) (64.147.108.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Mar 2017 09:38:37 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id B75B678289 for ; Wed, 22 Mar 2017 05:38:36 -0400 (EDT) Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id AE3B478288 for ; Wed, 22 Mar 2017 05:38:36 -0400 (EDT) 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-smtp1.pobox.com (Postfix) with ESMTPSA id 2095D78285 for ; Wed, 22 Mar 2017 05:38:36 -0400 (EDT) Received: by mail-io0-f180.google.com with SMTP id l7so62771299ioe.3 for ; Wed, 22 Mar 2017 02:38:35 -0700 (PDT) X-Gm-Message-State: AFeK/H3CQzKEvRPmWNC8a+lStzExGO8MFHrGbIwiVHuCuLcAqn3S+qZ9/u5r++ZyIhgy981OVezEm65Rf+lykw== X-Received: by 10.107.183.20 with SMTP id h20mr35185448iof.18.1490175515380; Wed, 22 Mar 2017 02:38:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.132.228 with HTTP; Wed, 22 Mar 2017 02:37:54 -0700 (PDT) In-Reply-To: References: <20161120204526.7203-1-jonah@kichwacoders.com> <9c9ac6f4-1f6c-3ebe-b23d-3611f4f52192@codesourcery.com> <3d3a1226-dbb2-04ef-c922-3462e6f318b3@codesourcery.com> From: Jonah Graham Date: Wed, 22 Mar 2017 09:38:00 -0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] bound_registers.py: Add support for Python 3 To: Yao Qi Cc: Pedro Alves , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pobox-Relay-ID: 526EA816-0EE3-11E7-95D6-97B1B46B9B0B-18936988!pb-smtp1.pobox.com X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00389.txt.bz2 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 wrote: > On Fri, Mar 17, 2017 at 3:00 PM, Pedro Alves 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 =3D str >> + long =3D 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 (=E9=BD=90=E5=B0=A7)