From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>, Alan Hayward <Alan.Hayward@arm.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
nd <nd@arm.com>
Subject: Re: [PATCH 8/11] Add FRV_MAX_REGISTER_SIZE
Date: Wed, 03 May 2017 09:27:00 -0000 [thread overview]
Message-ID: <ff095f3a-aa63-7d23-5edc-167f16cbacf7@redhat.com> (raw)
In-Reply-To: <86d1bqba87.fsf@gmail.com>
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
next prev parent reply other threads:[~2017-05-03 9:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 10:14 Alan Hayward
2017-04-11 10:02 ` Yao Qi
[not found] ` <EBF2EEFF-20D5-43F3-B35D-5BB37C3CB153@arm.com>
2017-04-27 8:55 ` Alan Hayward
2017-05-03 8:44 ` Yao Qi
2017-05-03 9:27 ` Pedro Alves [this message]
[not found] ` <CE496FA1-0D8A-47DC-B8E5-91598F30C93E@arm.com>
2017-05-03 11:23 ` Pedro Alves
2017-05-03 11:36 ` Alan Hayward
2017-05-03 13:34 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff095f3a-aa63-7d23-5edc-167f16cbacf7@redhat.com \
--to=palves@redhat.com \
--cc=Alan.Hayward@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=nd@arm.com \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox