On 12 March 2012 06:53, Christoffer Dall <c.dall at virtualopensystems.com> wrote: > @@ -1913,6 +1913,7 @@ static void gdb_set_cpu_pc(GDBState *s, target_ulong pc) > ? ? s->c_cpu->pc = pc; > ? ? s->c_cpu->npc = pc + 4; > ?#elif defined (TARGET_ARM) > + ? ?cpu_synchronize_state(s->c_cpu); > ? ? s->c_cpu->regs[15] = pc; > ?#elif defined (TARGET_SH4) > ? ? s->c_cpu->pc = pc; Rather than this we should just pull the call to cpu_synchronize_state() out to before the target ifdef ladder. The only other KVM cpu without it is PPC and Alex says that's an omission rather than deliberate. I'll throw together a patch for qemu upstream that does this. > + ? ?/* This is ugly, but necessary for GDB compatibility */ > + ? ?env->cp15.c2_control = regs.cp15.c2_control; > + ? ?env->cp15.c2_mask = ~(((uint32_t)0xffffffffu) >> regs.cp15.c2_control); > + ? ?env->cp15.c2_base_mask = ~((uint32_t)0x3fffu >> regs.cp15.c2_control); > + Yeah. I'll let this through for now but we should clean up as part of handling marshalling cp15 to/from the kernel properly. -- PMM