This is the mail archive of the gdb-patches@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]

Re: [RFA] mips fp register display


>>
>> On the other hand, I think that perhaps if FR is set
>> REGISTER_RAW_SIZE (regnum) ought to be 4.  Isn't that what it means?

> 
> It seems to me that REGISTER_VIRTUAL_SIZE() is the macro that should provide
> this info, as the raw register doesn't change.  Neither of these check the FR
> bit.


FYI,  REGISTER_RAW_SIZE() returns the number of bytes used to store the targets _raw_

register.  When a MIPS3/4/5 is executing MIPS2 code, the raw FP register still contains

64 bits.  It is just that only the low 32 bits is being used.  This is 
very like a 64 bit MIPS cpu running a 32 bit program.  This typically 
only occures in embedded environments.

With regard to REGISTER_RAW_SIZE and REGISTER_CONVERT_TO_TYPE.  They are 
about to be deprecated .... (see TODO).  The methods 
gdbarch_register_{read,write} were recently added and they really clean 
up that mess.  I wouldn't be too worried about using them here.

	Andrew


>> Also, we already have REGISTER_CONVERT_TO_TYPE.  Rather than hacking in
>> a third or perhaps fourth copy of this sort of thing, why not extend
>> REGISTER_CONVERT_TO_TYPE?
> 
> 
> I would guess (I'm no authority though) that REGISTER_CONVERT_TO_VIRTUAL() and
> REGISTER_CONVERT_TO_RAW() might be better places to do this.
> 
> I chose to implement a new read_fp_register() function so that insight could
> benifit from the fix also.  print_register() and do_register_row() affect cli
> gdb only.






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