This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/16113] New: gdb.Value needs a way to reference a superclass sub-object
- From: "tromey at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 01 Nov 2013 18:26:21 +0000
- Subject: [Bug python/16113] New: gdb.Value needs a way to reference a superclass sub-object
- Auto-submitted: auto-generated
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.