This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/16113] New: gdb.Value needs a way to reference a superclass sub-object


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]