A matter of taste?
Andrew Cagney
ac131313@redhat.com
Wed Jul 9 14:24:00 GMT 2003
> Corinna Vinschen <vinschen@redhat.com> writes:
>
> |> Hi,
> |>
> |> I'm currently substituting a bunch of calls to REGISTER_RAW_SIZE.
> |> Since REGISTER_RAW_SIZE should be removed entirely, I was wondering
> |> how to do it most nicely.
> |>
> |> What I don't quite get is the implementation of function register_size
> |> in regcache.c. It retrieves the size of the regsiter from the
> |> regcache and then checks twice(!) if that size equals REGISTER_RAW_SIZE.
>
> The second check probabably should have been against
> REGISTER_VIRTUAL_SIZE.
but it turned out that enabling it would have broken some targets :-(
> |> If I understand that correctly, a multi-arched target which got rid of
> |> REGISTER_RAW_SIZE can't use register_size () since the REGISTER_RAW_SIZE
> |> calls in register_size will raise an internal_error in
> |> gdbarch_deprecated_register_raw_size().
>
> If you don't define REGISTER_RAW_SIZE then it is defined to
> generic_register_size, which uses TYPE_LENGTH.
Yes.
> |> What is that good for? And what's the substitute for a target with
> |> no REGISTER_RAW_SIZE implementation?
>
> Just use register_size. Works fine on m68k.
>
> Andreas.
I'll adjust the comments.
Andrew
More information about the Gdb
mailing list