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] Remove MAX_REGISTER_SIZE from regcache.c


On Mon, Apr 10, 2017 at 9:59 AM, Yao Qi <qiyaoltc@gmail.com> wrote:
>
> This patches removes the 2nd argument of regcache_restore, because it
> is only called by regcache_cpy.  In regcache_cpy, if regcache_restore
> is called, dst is not readonly, but src is readonly.  So this patch
> adds an assert that src is readonly in regcache_restore.
> regcache_cook_read read everything from a readonly regcache cache
> (src)'s register_buffer, and register status is from src->register_status.
>
> gdb:
>
> 2017-04-07  Yao Qi  <yao.qi@linaro.org>
>
>         * regcache.c (regcache_restore): Remove argument 2.  Replace
>         argument 3 with regcache.  Get register status from
>         src->register_status and get register contents from
>         register_buffer (src, regnum).
>         (regcache_cpy): Update.
>

Tested it again on x86_64-linux.  Pushed it in.

-- 
Yao (齐尧)


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