From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qtn7M-0002Zl-6T for qemu-devel@nongnu.org; Wed, 17 Aug 2011 16:53:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qtn7L-0007l8-Dg for qemu-devel@nongnu.org; Wed, 17 Aug 2011 16:53:40 -0400 Received: from mail-iy0-f171.google.com ([209.85.210.171]:44139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qtn7L-0007ku-AY for qemu-devel@nongnu.org; Wed, 17 Aug 2011 16:53:39 -0400 Received: by iyf13 with SMTP id 13so2653863iyf.30 for ; Wed, 17 Aug 2011 13:53:38 -0700 (PDT) From: Bryce Lanham Date: Wed, 17 Aug 2011 15:53:22 -0500 Message-Id: <1313614410-29359-2-git-send-email-blanham@gmail.com> In-Reply-To: <1313614410-29359-1-git-send-email-blanham@gmail.com> References: <1313614410-29359-1-git-send-email-blanham@gmail.com> Subject: [Qemu-devel] [PATCH 091/111] m68k: don't call gdb_register_coprocessor() twice. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Laurent Vivier From: Laurent Vivier On a clone(), cpu_copy() calls cpu_int() which tries to register again gdb_register_coprocessor(). Signed-off-by: Laurent Vivier --- target-m68k/helper.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target-m68k/helper.c b/target-m68k/helper.c index 4edbc90..e1a73b8 100644 --- a/target-m68k/helper.c +++ b/target-m68k/helper.c @@ -246,11 +246,6 @@ static int cpu_m68k_set_model(CPUM68KState *env, const char *name) } register_m68k_insns(env); - if (m68k_feature (env, M68K_FEATURE_CF_FPU) || - m68k_feature (env, M68K_FEATURE_FPU)) { - gdb_register_coprocessor(env, fpu_gdb_get_reg, fpu_gdb_set_reg, - 11, "cf-fp.xml", 18); - } /* TODO: Add [E]MAC registers. */ return 0; } @@ -292,7 +287,6 @@ CPUM68KState *cpu_m68k_init(const char *cpu_model) env = qemu_mallocz(sizeof(CPUM68KState)); cpu_exec_init(env); if (!inited) { - inited = 1; m68k_tcg_init(); } @@ -304,7 +298,13 @@ CPUM68KState *cpu_m68k_init(const char *cpu_model) } cpu_reset(env); + if (!inited && (m68k_feature (env, M68K_FEATURE_CF_FPU) || + m68k_feature (env, M68K_FEATURE_FPU))) { + gdb_register_coprocessor(env, fpu_gdb_get_reg, fpu_gdb_set_reg, + 11, "cf-fp.xml", 18); + } qemu_init_vcpu(env); + inited = 1; return env; } -- 1.7.2.3