From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LH40d-0000tm-Tw for qemu-devel@nongnu.org; Sun, 28 Dec 2008 17:21:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LH40Z-0000tZ-6L for qemu-devel@nongnu.org; Sun, 28 Dec 2008 17:21:18 -0500 Received: from [199.232.76.173] (port=48763 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LH40Z-0000tW-12 for qemu-devel@nongnu.org; Sun, 28 Dec 2008 17:21:15 -0500 Received: from soufre.accelance.net ([213.162.48.15]:50515) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LH40Y-0008FZ-MI for qemu-devel@nongnu.org; Sun, 28 Dec 2008 17:21:14 -0500 Received: from [192.168.0.3] (potipota.net [88.168.176.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by soufre.accelance.net (Postfix) with ESMTP id 8223645153 for ; Sun, 28 Dec 2008 23:21:11 +0100 (CET) Subject: Re: [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub From: Lionel Landwerlin In-Reply-To: <4943BD66.60109@web.de> References: <1229125944.3898.39.camel@cocoduo.atr> <1229126410.3898.42.camel@cocoduo.atr> <49438B8B.8050709@web.de> <1229171501.3898.53.camel@cocoduo.atr> <4943B1B6.9010707@web.de> <1229174473.3898.61.camel@cocoduo.atr> <4943BD66.60109@web.de> Content-Type: text/plain; charset=utf-8 Date: Sun, 28 Dec 2008 23:21:05 +0100 Message-Id: <1230502865.4119.3.camel@cocoduo.atr> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Le samedi 13 d=C3=A9cembre 2008 =C3=A0 14:49 +0100, Jan Kiszka a =C3=A9cr= it : > --------> >=20 > Subject: [PATCH] Adopt cpu_copy to new breakpoint API >=20 > Latest changes to the cpu_breakpoint/watchpoint API broke cpu_copy. Thi= s > patch fixes it by cloning the breakpoint and watchpoint lists > appropriately. >=20 > Thanks to Lionel Landwerlin for pointing out. >=20 > Signed-off-by: Jan Kiszka > --- >=20 > exec.c | 24 +++++++++++++++++++++++- > 1 files changed, 23 insertions(+), 1 deletions(-) >=20 > diff --git a/exec.c b/exec.c > index 44f6a42..193a43c 100644 > --- a/exec.c > +++ b/exec.c > @@ -1654,12 +1654,34 @@ void cpu_abort(CPUState *env, const char *fmt, = ...) > CPUState *cpu_copy(CPUState *env) > { > CPUState *new_env =3D cpu_init(env->cpu_model_str); > - /* preserve chaining and index */ > CPUState *next_cpu =3D new_env->next_cpu; > int cpu_index =3D new_env->cpu_index; > +#if defined(TARGET_HAS_ICE) > + CPUBreakpoint *bp; > + CPUWatchpoint *wp; > +#endif > + > memcpy(new_env, env, sizeof(CPUState)); > + > + /* Preserve chaining and index. */ > new_env->next_cpu =3D next_cpu; > new_env->cpu_index =3D cpu_index; > + > + /* Clone all break/watchpoints. > + Note: Once we support ptrace with hw-debug register access, mak= e sure > + BP_CPU break/watchpoints are handled correctly on clone. */ > + TAILQ_INIT(&env->breakpoints); > + TAILQ_INIT(&env->watchpoints); > +#if defined(TARGET_HAS_ICE) > + TAILQ_FOREACH(bp, &env->breakpoints, entry) { > + cpu_breakpoint_insert(new_env, bp->pc, bp->flags, NULL); > + } > + TAILQ_FOREACH(wp, &env->watchpoints, entry) { > + cpu_watchpoint_insert(new_env, wp->vaddr, (~wp->len_mask) + 1, > + wp->flags, NULL); > + } > +#endif > + > return new_env; > } > =20 >=20 Is this patch going to be integrated anytime soon ? --=20 =EF=BB=BFLione Landwerlin =20 =EF=BB=BF O p e n W i d e 14, rue Gaillon 75002 Paris