This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] ptype: show members of an unnamed struct inside an union
> >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