From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69657 invoked by alias); 21 Oct 2015 19:59:38 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 69502 invoked by uid 55); 21 Oct 2015 19:59:38 -0000 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug python/18073] gdb.Type.fields() throws an exception when called on a function type Date: Wed, 21 Oct 2015 19:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q4/txt/msg00037.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18073 --- Comment #1 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Simon Marchi : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bed91f4da252b5f30d3cb4fd9f9febd61ad9560d commit bed91f4da252b5f30d3cb4fd9f9febd61ad9560d Author: Simon Marchi Date: Wed Oct 21 15:57:22 2015 -0400 Fix accessing a function's fields (parameters) from Python (PR 18073) 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. -- You are receiving this mail because: You are on the CC list for the bug.