From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTXrr-0005Pv-Ei for qemu-devel@nongnu.org; Thu, 05 Mar 2015 10:39:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTXrk-0000EZ-Pz for qemu-devel@nongnu.org; Thu, 05 Mar 2015 10:39:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTXrk-0000EE-IF for qemu-devel@nongnu.org; Thu, 05 Mar 2015 10:39:12 -0500 From: Eduardo Habkost Date: Thu, 5 Mar 2015 12:38:46 -0300 Message-Id: <1425569930-6660-3-git-send-email-ehabkost@redhat.com> In-Reply-To: <1425569930-6660-1-git-send-email-ehabkost@redhat.com> References: <1425569930-6660-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 2/6] 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 Cc: zhugh.fnst@cn.fujitsu.com, tangchen@cn.fujitsu.com, chen.fan.fnst@cn.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, Paolo Bonzini , Gu Zheng , Igor Mammedov , anshul.makkar@profitbricks.com, =?UTF-8?q?Andreas=20F=C3=A4rber?= One small step in the simplification of cpu_exec_init(). 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 3a61e51..8220535 100644 --- a/exec.c +++ b/exec.c @@ -542,8 +542,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 970377e..b69ac41 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