This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Remove MAX_REGISTER_SIZE from remote.c
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Alan Hayward <Alan dot Hayward at arm dot com>
- Cc: "gdb-patches\@sourceware.org" <gdb-patches at sourceware dot org>,
- Date: Fri, 24 Feb 2017 16:14:50 +0000
- Subject: Re: [PATCH] Remove MAX_REGISTER_SIZE from remote.c
- Authentication-results: sourceware.org; auth=none
- References: <00284BCB-10B9-41A6-BEFA-7873F4BB3B95@arm.com>
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 (齐尧)