This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] mips fp register display
- To: Don Howard <dhoward at redhat dot com>
- Subject: Re: [RFA] mips fp register display
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sat, 23 Jun 2001 14:03:00 -0400
- Cc: Daniel Jacobowitz <dmj+ at andrew dot cmu dot edu>,gdb-patches at sources dot redhat dot com
- References: <Pine.LNX.4.33.0106220738380.1135-100000@theotherone>
>>
>> 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.