[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] mips64 gdbstub broken
From: |
Paul Brook |
Subject: |
[Qemu-devel] mips64 gdbstub broken |
Date: |
Sat, 10 Nov 2007 14:53:59 +0000 |
User-agent: |
KMail/1.9.7 |
A recent CVS commit ("Fix gdb stub for MIPS64.") looks incorrect:
> diff -u -r1.66 -r1.67
> --- gdbstub.c 8 Oct 2007 13:16:14 -0000 1.66
> +++ gdbstub.c 25 Oct 2007 21:30:37 -0000 1.67
> @@ -563,7 +563,7 @@
> ptr += sizeof(target_ulong);
> }
>
> - *(target_ulong *)ptr = tswapl(env->CP0_Status);
> + *(target_ulong *)ptr = (int32_t)tswap32(env->CP0_Status);
> ptr += sizeof(target_ulong);
This is obviously bogus. The new value sent to gdb will depend on the host
endianness.
I suspect what you meant to do is
*(target_ulong *)ptr = tswapl((int32_t)env->CP0_Status);
i.e. sign extended to a target-endian 64-bit value. This is consistent with
the implementation of cpu_gdb_write_registers.
Could you confirm?
Paul
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] mips64 gdbstub broken,
Paul Brook <=