From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109107 invoked by alias); 22 Mar 2017 09:16:24 -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 109082 invoked by uid 89); 22 Mar 2017 09:16:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=printers, HX-Received:10.55.166.11 X-HELO: mail-qk0-f177.google.com Received: from mail-qk0-f177.google.com (HELO mail-qk0-f177.google.com) (209.85.220.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Mar 2017 09:16:21 +0000 Received: by mail-qk0-f177.google.com with SMTP id p64so153412794qke.1 for ; Wed, 22 Mar 2017 02:16:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=mybgp2YiiwqfzUilgGQKz3Dyu76nOAQG16GXlJSy5X8=; b=SHe7H2O1Fq6pFLluzIKxFhOkFH3K2tLP0SloOYbdrZAEO+SHDgqdKNRYNMVhTxk6bR czcoDQQJmYKaprxZPmOjFlO+0QfhJZkvTZGMj0f/Hng0sBgYrc5OeaxnDqI7KIbZ6quI c7Z6tu2RXLkV5aDZZcq6XAvT726E9ejKXNDx2F4bldBKLgbAnDPqVVtowJGhaUU2Fqvp PTcKfH8y7nSSH3ZjbquTU09ePQP7e44PHdwGo0JP5GjxRho8lfYFlYBlYiVryN9e7QCS qlxyheyKFIcn3hVF8itCiRVf30EyW4gYUpk0XMb0t+l1dg5j4Cqb7023N/ZpEBtUXpOp JeCg== X-Gm-Message-State: AFeK/H0mKmSzVEXX04idy8MGVZ6X3YEBEHI1BKbpItAnrzGpC45oby0FIzSduPRsDcNAu7dTyjBOvkiuOwe+cg== X-Received: by 10.55.166.11 with SMTP id p11mr36211146qke.132.1490174180484; Wed, 22 Mar 2017 02:16:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.140.130 with HTTP; Wed, 22 Mar 2017 02:16:20 -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: Yao Qi Date: Wed, 22 Mar 2017 09:16:00 -0000 Message-ID: Subject: Re: [PATCH] bound_registers.py: Add support for Python 3 To: Pedro Alves Cc: Jonah Graham , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00388.txt.bz2 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/l= ib/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. --=20 Yao (=E9=BD=90=E5=B0=A7)