From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21138 invoked by alias); 21 Oct 2015 19:47:22 -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 21129 invoked by uid 89); 21 Oct 2015 19:47:22 -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,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 21 Oct 2015 19:47:21 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 67000118260; Wed, 21 Oct 2015 15:47:19 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OmnBv5bG3WAU; Wed, 21 Oct 2015 15:47:19 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4D623118252; Wed, 21 Oct 2015 15:47:19 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id DB15041C7F; Wed, 21 Oct 2015 15:47:18 -0400 (EDT) Date: Thu, 22 Oct 2015 10:06:00 -0000 From: Joel Brobecker To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix accessing a function's fields (parameters) from Python (PR 18073) Message-ID: <20151021194718.GD3971@adacore.com> References: <1443415430-31110-1-git-send-email-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-10/txt/msg00432.txt.bz2 Hi Simon, > > Since 7.4, gdb doesn't allow calling .fields() on a function type, even > > though the documentation states it should return a list corresponding to > > the function's parameters. This patch restores the intended behaviour > > and adds a test for it. > > > > Reg-tested on Arch Linux x86-64. > > > > gdb/ChangeLog: > > > > PR python/18073 > > * python/py-type.c (typy_get_composite): Allow returning a > > function type. > > > > gdb/testsuite/ChangeLog: > > > > PR python/18073 > > * gdb.python/py-type.c (C::a_method): New. > > (C::a_const_method): New. > > (C::a_static_method): New. > > (a_function): New. > > * gdb.python/py-type.exp (test_fields): Test getting fields > > from function and method. The patch looks good to me, although I am not one of the main Python maintainers. Normally, I'd ask the author to wait an extra week for additional comments, but since you've already waited a month, I think it's only fair to give you the go ahead to push. If there are comments with your code, we can handle them then. Thanks also adding the tests. You probably know this, but this is always appreciated. Thanks! -- Joel