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/12070] New: gdb.Field object attributes not visible from "dir"


The python "dir" command prints the list of attributes of an object, but it 
doesn't work completely for gdb.Field objects.

foo.cc:
enum myenum { FOO = 42 };
int main() { return FOO; }

(gdb) py myenum = gdb.lookup_type("myenum")
(gdb) py print dir(myenum.fields()[0])
-->
['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', 
'__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', 
'__str__']

Note that "name", etc. are missing.

-- 
           Summary: gdb.Field object attributes not visible from "dir"
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: dje at google dot com
                CC: gdb-prs at sourceware dot org
  GCC host triplet: amd64-linux


http://sourceware.org/bugzilla/show_bug.cgi?id=12070

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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