This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/12070] New: gdb.Field object attributes not visible from "dir"
- From: "dje at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 28 Sep 2010 16:15:51 -0000
- Subject: [Bug python/12070] New: gdb.Field object attributes not visible from "dir"
- Reply-to: sourceware-bugzilla at sourceware dot org
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.