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 remote.c


Alan Hayward <Alan.Hayward@arm.com> writes:

> -enum register_status
> -regcache_raw_read (struct regcache *regcache, int regnum, gdb_byte *buf)
> +void
> +regcache_raw_update (struct regcache *regcache, int regnum)
>  {
> -  gdb_assert (regcache != NULL && buf != NULL);
> -  gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
>    /* Make certain that the register cache is up-to-date with respect
>       to the current thread.  This switching shouldn't be necessary
>       only there is still only one target side register cache.  Sigh!
>       On the bright side, at least there is a regcache object.  */
> +
> +  gdb_assert (regcache != NULL);
> +  gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);

Nit, any reason you move these asserts from one place to another?  It
causes one unnecessary change.  Could you change the assert in its
original place?

OK with this change.

-- 
Yao (齐尧)


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