This is the mail archive of the gdb@sources.redhat.com 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]

register_size question (was Re: A matter of taste?)


Oops, sorry for the weird subject, I mixed the subject of one
mail with the content of another one. :-(((

I'm going to send a patch related to this mail to gdb-patches in a
minute (with a better subject, of course).

Corinna

On Wed, Jul 09, 2003 at 03:55:43PM +0200, Corinna Vinschen wrote:
> 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.
> 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().
> 
> What is that good for?  And what's the substitute for a target with
> no REGISTER_RAW_SIZE implementation?  One idea is to use the constant
> byte size in cases where it's clear (the tdep code typically knows
> the register size).  But that looks always a bit ugly.  So, would
> 
>   TYPE_LENGTH (gdbarch_register_type (gdbarch, regnum))
> 
> be a good way to do it?
> 
> 
> Corinna

-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen@redhat.com


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