On 14.01.2014, at 23:55, Peter Maydell <peter.mayd...@linaro.org> wrote:

> On 14 January 2014 22:40, Alexander Graf <ag...@suse.de> wrote:
>> Uli, I thought ppc64le gdb wasn't finalized yet? What does the gdbstub
>> layout look like? Are all fields the same as ppc64(be) but simply byte
>> swapped - including FPR ones?
> 
>> This is quite invasive (and prone to get wrong). If we really just have
>> to swap every single register by its size (which we yet have to confirm
>> with Uli) why don't we just wrap this function by another one that takes
>> the return value of ppc_cpu_gdb_read_register (the integer size) and
>> swaps it in-place in mem_buf? At least we're 100% consistent that way.
> 
> Note that we already support "fields in the buffer are in target byte order"
> (ie matching TARGET_WORDS_BIGENDIAN) with gdb_get_reg*,
> "fields are always LE" (use st*_le_p()) and "fields are always BE"
> (use st*_be_p()).
> 
> Is the underlying issue here that we might have a CPU which is
> in littleendian mode but in a QEMU executable compiled with
> TARGET_WORDS_BIGENDIAN ?  (If so I can't help feeling that
> the gdb stub is only the tip of the iceberg for things that might need
> attention...)

Yes, which is going to be the same problem you have for AArch64 :). LE vs BE is 
really just a register flip. The qemu binary is the same for both when you run 
system emulation mode.


Alex


Reply via email to