diff options
-rw-r--r-- | target/i386/gdbstub.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c index 4ad1295425..098a2ad15a 100644 --- a/target/i386/gdbstub.c +++ b/target/i386/gdbstub.c @@ -351,22 +351,30 @@ int x86_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) case IDX_CTL_CR0_REG: len = gdb_write_reg_cs64(env->hflags, mem_buf, &tmp); +#ifndef CONFIG_USER_ONLY cpu_x86_update_cr0(env, tmp); +#endif return len; case IDX_CTL_CR2_REG: len = gdb_write_reg_cs64(env->hflags, mem_buf, &tmp); +#ifndef CONFIG_USER_ONLY env->cr[2] = tmp; +#endif return len; case IDX_CTL_CR3_REG: len = gdb_write_reg_cs64(env->hflags, mem_buf, &tmp); +#ifndef CONFIG_USER_ONLY cpu_x86_update_cr3(env, tmp); +#endif return len; case IDX_CTL_CR4_REG: len = gdb_write_reg_cs64(env->hflags, mem_buf, &tmp); +#ifndef CONFIG_USER_ONLY cpu_x86_update_cr4(env, tmp); +#endif return len; case IDX_CTL_CR8_REG: @@ -378,7 +386,9 @@ int x86_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) case IDX_CTL_EFER_REG: len = gdb_write_reg_cs64(env->hflags, mem_buf, &tmp); +#ifndef CONFIG_USER_ONLY cpu_load_efer(env, tmp); +#endif return len; } } |