This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 7/11] Add BFIN_MAX_REGISTER_SIZE
Alan Hayward <Alan.Hayward@arm.com> writes:
> There is some existing code in regcache.c that checks that no register in the
> target descriptor is greater than MAX_REGISTER_SIZE.
> Obviously, this code will vanish when MAX_REGISTER_SIZE disappears.
>
> If people think that this is an important check to have, then maybe there needs
> to be an additional patch set. For each target with a FOO_MAX_REGISTER_SIZE,
> in the init code for that target add:
> gdb_assert (FOO_MAX_REGISTER_SIZE >= max_register_size (gdbarch));
> ?
It is not just about checking. What if the assert fail?
FOO_MAX_REGISTER_SIZE is a strong claim for arch FOO. That is why I
suggested "or we can define ASTAT_REGISTER_SIZE".
>
> (To keep this simple I’d do it after adding these patches which add
> FOO_MAX_REGISTER_SIZE).
--
Yao (齐尧)