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/15464] New: Accessing anonymous unions from Python


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

             Bug #: 15464
           Summary: Accessing anonymous unions from Python
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned@sourceware.org
        ReportedBy: andre.poenitz@digia.com
    Classification: Unclassified


If I have a 

  struct X { union { Y y; Z z; } } x; 

and later 

  a = gdb.parse_and_eval("x")

there seems to be no easy way to access the "union" "level".

'a' itself is the struct, 'a["y"]' transparently skips the union and gives the
named member.

It would be nice if there was a way to iterate through the children of the
struct. MI/varobjs nowaday seem to have that ability.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]