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]

Re: [remote] Make registers network byteordered?


"Frank Ch. Eigler" wrote:
> 
> cagney wrote:
> 
> : [...]
> : > What's the point?  Simply that registers don't have an endianness?
> :
> : Several motivations:
> : [...]
> :       o       I've had it with trying to read
> :               what are endian independant values
> :               backwards.
> 
> Certainly a laudable goal.  What would be the corresponding syntax for
> the `g' and `p'/`P' packets?  Is there any intended support for
> mismatching register sizes (e.g., 4-byte vs sign-extended 8-byte MIPS
> pointers)?

The ``gG'' packets will most likely be as they currently are for ever.

The ``pP'' packets are more interesting.  The read-a-register is pretty
easy.  The write a register is harder.  My best guess is to assume
network endian (and ``='') if the target sends us a ``='' in a packet.

As for 4-byte vs 8-byte.  I think this is more of a remote.c problem. 
remote.c should be better at converting to/from the targets registers to
GDB internal registers.

	Andrew

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