On Tue, 24 Aug 2021 at 00:05, Changbin Du <changbin...@gmail.com> wrote: > > On Mon, Aug 23, 2021 at 04:30:05PM +0100, Peter Maydell wrote: > > changes to be more capable of handling dynamic target changes > > (this would also help with eg debugging across 32<->64 bit switches); > > as I understand it that gdb work would be pretty significant, > > and at least for aarch64 pretty much nobody cares about > > big-endian, so nobody's got round to doing it yet. > > > Mostly we do not care dynamic target changes because nearly all OS will setup > endianness mode by its first instruction. And dynamic changes for gdb is hard > since the byte order of debugging info in elf is fixed. And currently the GDB > remote protocol does not support querying endianness info from remote. > > So usually we needn't change byte order during a debug session, but we just > want > the qemu gdbstub can send data in and handle data it received in right byte > order. > This patch does this work with the help of users via the option 'endianness='.
I'm not a huge fan of putting in workarounds that deal with the problem for specific cases and require users to tweak options settings, rather than solving the problem in a more general way that would let it all Just Work for all cases. -- PMM