Commit 4a2b24ed authored by Peter Crosthwaite's avatar Peter Crosthwaite Committed by Andreas Färber
Browse files

gdbstub: Use cpu_set_pc() helper



Use the cpu_set_pc() helper which will take care of CPUClass retrieval
for us.

Signed-off-by: default avatarPeter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
parent 2991b890
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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)