mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
cpu: Introduce CPUClass::set_pc() for gdb_set_cpu_pc()
This moves setting the Program Counter from gdbstub into target code. Use vaddr type as upper-bound replacement for target_ulong. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
2be8d45098
commit
f45748f10e
15 changed files with 119 additions and 33 deletions
|
@ -8322,6 +8322,13 @@ CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)
|
|||
return cpu_list;
|
||||
}
|
||||
|
||||
static void ppc_cpu_set_pc(CPUState *cs, vaddr value)
|
||||
{
|
||||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||
|
||||
cpu->env.nip = value;
|
||||
}
|
||||
|
||||
/* CPUClass::reset() */
|
||||
static void ppc_cpu_reset(CPUState *s)
|
||||
{
|
||||
|
@ -8449,6 +8456,7 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
|
|||
cc->do_interrupt = ppc_cpu_do_interrupt;
|
||||
cc->dump_state = ppc_cpu_dump_state;
|
||||
cc->dump_statistics = ppc_cpu_dump_statistics;
|
||||
cc->set_pc = ppc_cpu_set_pc;
|
||||
}
|
||||
|
||||
static const TypeInfo ppc_cpu_type_info = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue