Skip to content
Snippets Groups Projects
Commit 2e34e622 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé
Browse files

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: default avatarThomas Huth <huth@tuxfamily.org>
Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200707070021.10031-3-f4bug@amsat.org>
parent a291bc85
No related branches found
No related tags found
No related merge requests found
......@@ -151,7 +151,7 @@ static void avr_cpu_dump_state(CPUState *cs, FILE *f, int flags)
int i;
qemu_fprintf(f, "\n");
qemu_fprintf(f, "PC: %06x\n", env->pc_w);
qemu_fprintf(f, "PC: %06x\n", env->pc_w * 2); /* PC points to words */
qemu_fprintf(f, "SP: %04x\n", env->sp);
qemu_fprintf(f, "rampD: %02x\n", env->rampD >> 16);
qemu_fprintf(f, "rampX: %02x\n", env->rampX >> 16);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment