From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmpD7-00007z-2K for qemu-devel@nongnu.org; Mon, 27 Apr 2015 16:00:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmpD3-0007Xk-Tg for qemu-devel@nongnu.org; Mon, 27 Apr 2015 16:00:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmpD3-0007XZ-N1 for qemu-devel@nongnu.org; Mon, 27 Apr 2015 16:00:53 -0400 From: Eduardo Habkost Date: Mon, 27 Apr 2015 17:00:32 -0300 Message-Id: <1430164833-21006-3-git-send-email-ehabkost@redhat.com> In-Reply-To: <1430164833-21006-1-git-send-email-ehabkost@redhat.com> References: <1430164833-21006-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 2/3] cpu: Initialize breakpoint/watchpoint lists on cpu_common_initfn() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= Cc: Igor Mammedov One small step in the simplification of cpu_exec_init(). Reviewed-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- exec.c | 2 -- qom/cpu.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index 3566d8f..8d5d844 100644 --- a/exec.c +++ b/exec.c @@ -545,8 +545,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(); diff --git a/qom/cpu.c b/qom/cpu.c index 108bfa2..56c53a8 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -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) -- 2.1.0