Skip to content

Commit 2e34e62

Browse files
committed
target/avr/cpu: Fix $PC displayed address
$PC is 16-bit wide. Other registers display addresses on a byte granularity. To have a coherent ouput, display $PC using byte granularity too. Reviewed-by: Thomas Huth <[email protected]> Reviewed-by: Alex Bennée <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Message-Id: <[email protected]>
1 parent a291bc8 commit 2e34e62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

target/avr/cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static void avr_cpu_dump_state(CPUState *cs, FILE *f, int flags)
151151
int i;
152152

153153
qemu_fprintf(f, "\n");
154-
qemu_fprintf(f, "PC: %06x\n", env->pc_w);
154+
qemu_fprintf(f, "PC: %06x\n", env->pc_w * 2); /* PC points to words */
155155
qemu_fprintf(f, "SP: %04x\n", env->sp);
156156
qemu_fprintf(f, "rampD: %02x\n", env->rampD >> 16);
157157
qemu_fprintf(f, "rampX: %02x\n", env->rampX >> 16);

0 commit comments

Comments
 (0)