From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgYCk-0000cJ-UA for qemu-devel@nongnu.org; Thu, 06 Dec 2012 04:57:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgYCb-0003Tf-4P for qemu-devel@nongnu.org; Thu, 06 Dec 2012 04:57:18 -0500 Received: from cantor2.suse.de ([195.135.220.15]:50121 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgYCa-0003Ta-Ua for qemu-devel@nongnu.org; Thu, 06 Dec 2012 04:57:09 -0500 Message-ID: <50C06BF1.8000400@suse.de> Date: Thu, 06 Dec 2012 10:57:05 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1354762999-4135-1-git-send-email-lig.fnst@cn.fujitsu.com> <1354762999-4135-3-git-send-email-lig.fnst@cn.fujitsu.com> <1354785393.9018.3.camel@liguang.fnst.cn.fujitsu.com> <1354786064.9165.2.camel@liguang.fnst.cn.fujitsu.com> <50C06706.2010808@suse.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 3/3] target-i386:slightly refactor dr7 related function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: ehabkost@redhat.com, jan.kiszka@siemens.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, imammedo@redhat.com, li guang Am 06.12.2012 10:48, schrieb Peter Maydell: > On 6 December 2012 09:36, Andreas F=C3=A4rber wrote: >> The code comment specifically says "reset local breakpoints". IIUC you >> are also resetting global breakpoints, which you shouldn't. >> >> Personally I'd be fine with a hw_local_breakpoint_enabled(). >=20 > The check you want is > (hw_local_breakpoint_enabled() && !hw_global_breakpoint_enabled()) >=20 > if you're going to do it like that. [We don't want to take out the > bp if it was enabled globally as well as locally.] If it doesn't exist already (I'm assuming not, otherwise it could've been used) we could simply define the "local" function to return false if global is enabled. :) But maybe that's too clever. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg