提交 4a2b24ed 编写于 作者: P Peter Crosthwaite 提交者: Andreas Färber

gdbstub: Use cpu_set_pc() helper

Use the cpu_set_pc() helper which will take care of CPUClass retrieval
for us.
Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 2991b890
...@@ -754,12 +754,9 @@ static void gdb_breakpoint_remove_all(void) ...@@ -754,12 +754,9 @@ static void gdb_breakpoint_remove_all(void)
static void gdb_set_cpu_pc(GDBState *s, target_ulong pc) static void gdb_set_cpu_pc(GDBState *s, target_ulong pc)
{ {
CPUState *cpu = s->c_cpu; CPUState *cpu = s->c_cpu;
CPUClass *cc = CPU_GET_CLASS(cpu);
cpu_synchronize_state(cpu); cpu_synchronize_state(cpu);
if (cc->set_pc) { cpu_set_pc(cpu, pc);
cc->set_pc(cpu, pc);
}
} }
static CPUState *find_cpu(uint32_t thread_id) static CPUState *find_cpu(uint32_t thread_id)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册