Re: [patch] ptype: show members of an unnamed struct inside an union

Joel Brobecker
2007-08-28T20:04:11Z

> >Similarly in your example:
> >
> > (gdb) ptype mypage.u
> > type = union {
> > struct {
> > int mapping;
> > };
> > }
>
> Are you considering a named Union structure here? I could not reproduce
> this locally, since there's no such member "u" in the data structure.

Yes, I had to add a name to this field. Otherwise, there is no way
to name it!

--
Joel