Skip to content

Commit

Permalink
target-m68k: fix a typo in 'P' packet processing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kazu Hirata authored and aurel32 committed Jan 14, 2010
1 parent 5716990 commit b3d6b95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdbstub.c
Expand Up @@ -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 {
Expand Down

0 comments on commit b3d6b95

Please sign in to comment.