]> xenbits.xensource.com Git - qemu-xen-unstable.git/commitdiff
gdbstub: Use cpu_set_pc() helper
authorPeter Crosthwaite <crosthwaitepeter@gmail.com>
Wed, 24 Jun 2015 03:19:21 +0000 (20:19 -0700)
committerAndreas Färber <afaerber@suse.de>
Thu, 9 Jul 2015 13:20:40 +0000 (15:20 +0200)
Use the cpu_set_pc() helper which will take care of CPUClass retrieval
for us.

Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
gdbstub.c

index aa5ba5174d41b96cbd87e001ddad586bca1cc1ac..92b2f815847ac20953f607bc666fbea90822a7d0 100644 (file)
--- 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)