This is the mail archive of the gdb-patches@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]

Re: [PATCH] Handle bitfields inside inner structs for internalvars


On Sat, 09 Feb 2013 05:52:32 +0100, Sergio Durigan Junior wrote:
> On Friday, February 08 2013, Jan Kratochvil wrote:
> >> +	if (value_bitsize (toval))
> >> +	  offset += value_offset (value_parent (toval));
> >
> > value_address rather tests for value_parent existence; although value_bitsize
> > is right as value_parent is currently not used elsewhere.
> >
> > 	if (value_parent (toval))
> 
> Do you think it's clearer to use `value_parent' here instead of
> `value_bitsize'?

Choose any way but therefore put there a comment that value_parent is non-NULL
iff value_bitsize is non-zero.

Otherwise I was curious - what to do if value_parent exists but TOVAL is not
a bitfield?  Isn't it a forgotten case?  (It is not but...)


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]