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 8/11] Add FRV_MAX_REGISTER_SIZE


On 05/03/2017 09:44 AM, Yao Qi wrote:
> Alan Hayward <Alan.Hayward@arm.com> writes:
> 
> Hi Alan,
> regcache.c is updated, so please update your patch.
> 
>> I considered making regcache_raw_supply_zero call regcache_raw_supply, but
>> in the end it made more sense to make it completely separate.
> 
> You can call raw_supply (regnum, NULL) and then set the status to REG_VALID.
> 

I think I agree with Alan -- if we defer to raw_supply, then I'd still prefer
that the memset is still done in regcache_raw_supply_zero, because whether
unavailable registers actually have a contents buffer at all is
implementation detail.  We currently zero REG_UNVAILABLE registers in raw_supply,
but that could change.  (And if we reuse raw_supply as is, then memset, we'll
memset twice.)

BTW, note that gdbserver has an equivalent function, called
"supply_register_zeroed".

Thanks,
Pedro Alves


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