From: Peter Crosthwaite Date: Wed, 24 Jun 2015 03:19:21 +0000 (-0700) Subject: gdbstub: Use cpu_set_pc() helper X-Git-Tag: v2.4.0-rc0~3^2~9 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4a2b24edb73f98fa58fd8965db5b312617de7a02;p=qemu-xen-unstable.git gdbstub: Use cpu_set_pc() helper Use the cpu_set_pc() helper which will take care of CPUClass retrieval for us. Signed-off-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- diff --git a/gdbstub.c b/gdbstub.c index aa5ba5174d..92b2f81584 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -754,12 +754,9 @@ static void gdb_breakpoint_remove_all(void) static void gdb_set_cpu_pc(GDBState *s, target_ulong pc) { CPUState *cpu = s->c_cpu; - CPUClass *cc = CPU_GET_CLASS(cpu); cpu_synchronize_state(cpu); - if (cc->set_pc) { - cc->set_pc(cpu, pc); - } + cpu_set_pc(cpu, pc); } static CPUState *find_cpu(uint32_t thread_id)