提交 7c39163e 编写于 作者: E Eduardo Habkost 提交者: Andreas Färber

cpu: Initialize breakpoint/watchpoint lists in cpu_common_initfn()

One small step in the simplification of cpu_exec_init().
Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 199fc85a
......@@ -541,8 +541,6 @@ void cpu_exec_init(CPUArchState *env)
cpu_index++;
}
cpu->cpu_index = cpu_index;
QTAILQ_INIT(&cpu->breakpoints);
QTAILQ_INIT(&cpu->watchpoints);
#ifndef CONFIG_USER_ONLY
cpu->as = &address_space_memory;
cpu->thread_id = qemu_get_thread_id();
......
......@@ -313,6 +313,8 @@ static void cpu_common_initfn(Object *obj)
CPUClass *cc = CPU_GET_CLASS(obj);
cpu->gdb_num_regs = cpu->gdb_num_g_regs = cc->gdb_num_core_regs;
QTAILQ_INIT(&cpu->breakpoints);
QTAILQ_INIT(&cpu->watchpoints);
}
static int64_t cpu_common_get_arch_id(CPUState *cpu)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册