aboutsummaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2010-01-14 09:08:00 -0800
committerAurelien Jarno <aurelien@aurel32.net>2010-01-14 20:00:23 +0100
commitb3d6b95998a29fd5fe242d7354d64077ea53ae30 (patch)
tree284ed68b4e71c20e8c004ed3c6e5e3b8013737e0 /gdbstub.c
parent5716990376e22e758c434ba7092b8eacaa148973 (diff)
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 <kazu@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 6180171b05..80477be6a6 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 {