This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: unbreak typedefed bitfield
On Fri, Dec 18, 2009 at 05:06:12PM +0400, Joel Brobecker wrote:
> > --- a/gdb/value.c
> > +++ b/gdb/value.c
> > @@ -1873,6 +1873,7 @@ value_primitive_field (struct value *arg1, int offset,
> >
> > CHECK_TYPEDEF (arg_type);
> > type = TYPE_FIELD_TYPE (arg_type, fieldno);
> > + check_typedef (type);
> >
> > /* Handle packed fields */
>
> Looks OK to me (you forgot the ChangeLog entry, btw).
What does this do? CHECK_TYPEDEF side-effects its argument;
check_typedef will leave its argument as a TYPE_CODE_TYPEDEF. I think
it fills in some other fields in the typedef, is that what matters
here?
It's unusual to see check_typedef without an assignment.
--
Daniel Jacobowitz
CodeSourcery