mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-06-20 22:37:48 +00:00
cpu: Initialize breakpoint/watchpoint lists in cpu_common_initfn()
One small step in the simplification of cpu_exec_init(). Backports commit 7c39163e389e6e6e16965606fb5a26abcdb6ad73 from qemu
This commit is contained in:
parent
4e39fabd4d
commit
79c95aa18b
|
@ -411,9 +411,6 @@ void cpu_exec_init(CPUArchState *env, void *opaque)
|
||||||
env->uc = uc;
|
env->uc = uc;
|
||||||
|
|
||||||
cpu->cpu_index = 0;
|
cpu->cpu_index = 0;
|
||||||
QTAILQ_INIT(&cpu->breakpoints);
|
|
||||||
QTAILQ_INIT(&cpu->watchpoints);
|
|
||||||
|
|
||||||
cpu->as = &uc->as;
|
cpu->as = &uc->as;
|
||||||
|
|
||||||
// TODO: assert uc does not already have a cpu?
|
// TODO: assert uc does not already have a cpu?
|
||||||
|
|
|
@ -226,6 +226,10 @@ static int cpu_common_realizefn(struct uc_struct *uc, DeviceState *dev, Error **
|
||||||
|
|
||||||
static void cpu_common_initfn(struct uc_struct *uc, Object *obj, void *opaque)
|
static void cpu_common_initfn(struct uc_struct *uc, Object *obj, void *opaque)
|
||||||
{
|
{
|
||||||
|
CPUState *cpu = CPU(obj);
|
||||||
|
|
||||||
|
QTAILQ_INIT(&cpu->breakpoints);
|
||||||
|
QTAILQ_INIT(&cpu->watchpoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int64_t cpu_common_get_arch_id(CPUState *cpu)
|
static int64_t cpu_common_get_arch_id(CPUState *cpu)
|
||||||
|
|
Loading…
Reference in a new issue