From: Kazu Hirata Date: Thu, 14 Jan 2010 17:08:00 +0000 (-0800) Subject: target-m68k: fix a typo in 'P' packet processing X-Git-Tag: TizenStudio_2.0_p2.3~5977 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=903f841e47ebf1258b5decd019e7d941a0d4d342;p=sdk%2Femulator%2Fqemu.git target-m68k: fix a typo in 'P' packet processing Attached is a patch to fix a typo in 'P' packet processing for M68K. Without this patch, QEMU fails to honor GDB's P packets from GDB (writing to registers) for the address registers (A0 - A7). The problem is because of an obvious typo. Notice that the second "if" condition is meant to be n < 16 in: if (n < 8) { : } else if (n < 8) { Signed-off-by: Kazu Hirata Signed-off-by: Aurelien Jarno --- diff --git a/gdbstub.c b/gdbstub.c index 6180171..80477be 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1014,7 +1014,7 @@ static int cpu_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n) if (n < 8) { /* D0-D7 */ env->dregs[n] = tmp; - } else if (n < 8) { + } else if (n < 16) { /* A0-A7 */ env->aregs[n - 8] = tmp; } else {