From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyQg9-00038A-17 for qemu-devel@nongnu.org; Fri, 17 Feb 2012 11:29:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyQg4-0007AM-6D for qemu-devel@nongnu.org; Fri, 17 Feb 2012 11:29:01 -0500 Received: from david.siemens.de ([192.35.17.14]:30542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyQg3-00079l-PH for qemu-devel@nongnu.org; Fri, 17 Feb 2012 11:28:56 -0500 Message-ID: <4F3E8040.3040408@siemens.com> Date: Fri, 17 Feb 2012 17:28:48 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1329495781-5264-1-git-send-email-meadori@codesourcery.com> In-Reply-To: <1329495781-5264-1-git-send-email-meadori@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 1/1] exec: Fix watchpoint implementation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Meador Inge Cc: qemu-devel@nongnu.org On 2012-02-17 17:23, Meador Inge wrote: > Fix a bug introduced by commit 1ec9b909ff207a44d5ef2609cb4a2e3d449d485f > where 'watch_mem_write' was modified to fall-through to 'abort' on > every input. > > Signed-off-by: Meador Inge > --- > exec.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/exec.c b/exec.c > index b81677a..fe8b2d1 100644 > --- a/exec.c > +++ b/exec.c > @@ -3289,9 +3289,9 @@ static void watch_mem_write(void *opaque, target_phys_addr_t addr, > { > check_watchpoint(addr & ~TARGET_PAGE_MASK, ~(size - 1), BP_MEM_WRITE); > switch (size) { > - case 1: stb_phys(addr, val); > - case 2: stw_phys(addr, val); > - case 4: stl_phys(addr, val); > + case 1: return stb_phys(addr, val); > + case 2: return stw_phys(addr, val); > + case 4: return stl_phys(addr, val); > default: abort(); > } > } You likely wanted to introduce breaks here, no...? At this chance, please indent the code properly according to our coding style: switch ... case ... xxx; break; Thanks, Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux