qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] gdbstub: allow byte swapping for reading/writin


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] gdbstub: allow byte swapping for reading/writing registers
Date: Tue, 14 Jan 2014 22:55:05 +0000

On 14 January 2014 22:40, Alexander Graf <address@hidden> 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...)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]