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 symtab/10233] New: Pretty-printing support for tagged unions


There are two common paradigms for tagged (variant) unions - tag inside or
outside of the union.  For example:

struct common {
  int tag;
};

struct foo {
  struct common common;
  union u u;
};

struct bar_1 {
  struct common common;
  int x;
};

struct bar_2 {
  struct common common;
  int y;
};

union bar {
  struct bar_1 bar_1;
  struct bar_2 bar_2;
};

I'd like a concise way to write pretty-printers for these.  Real-life examples
include GCC trees and GDB types.

Another compiler I once used put the tag information into DWARF.  I don't know how.

-- 
           Summary: Pretty-printing support for tagged unions
           Product: gdb
           Version: archer
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: symtab
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: drow at sources dot redhat dot com
                CC: gdb-prs at sourceware dot org


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

------- 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]