From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2954 invoked by alias); 1 Nov 2013 18:26:22 -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 2925 invoked by uid 48); 1 Nov 2013 18:26:22 -0000 From: "tromey at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug python/16113] New: gdb.Value needs a way to reference a superclass sub-object Date: Fri, 01 Nov 2013 18:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: tromey at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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: 2013-q4/txt/msg00217.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16113 Bug ID: 16113 Summary: gdb.Value needs a way to reference a superclass sub-object Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: python Assignee: unassigned at sourceware dot org Reporter: tromey at redhat dot com Right now if you have a gdb.Value whose type is some class, and the class has a superclass, then there is no good way to refer to the phony "field" that gdb creates to represent the superclass. That is, for an ordinary field you can use value["fieldname"] -- but the superclass field doesn't have a regular name. We should extend valpy_getitem to also accept a gdb.Field as an index. This way a program could use the Type API to find the superclass field, and then pass this to the [] operation to extract the desired sub-object. -- You are receiving this mail because: You are on the CC list for the bug.