From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10678 invoked by alias); 4 Jun 2009 10:31:42 -0000 Received: (qmail 10608 invoked by uid 22791); 4 Jun 2009 10:31:40 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Jun 2009 10:31:32 +0000 Received: from eliz by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MCAEM-0005ix-2I; Thu, 04 Jun 2009 06:31:30 -0400 From: Eli Zaretskii To: "Pierre Muller" CC: gdb-patches@sourceware.org In-reply-to: <000301c9e4e6$b40c5d50$1c2517f0$@u-strasbg.fr> (muller@ics.u-strasbg.fr) Subject: Re: [RFA-v2] Fix a windows bug if two watchpoints are used Reply-to: Eli Zaretskii References: <000301c9e49e$c479eba0$4d6dc2e0$@u-strasbg.fr> <000601c9e4a3$b2f2f980$18d8ec80$@u-strasbg.fr> <000001c9e4de$6e550cb0$4aff2610$@u-strasbg.fr> <000301c9e4e6$b40c5d50$1c2517f0$@u-strasbg.fr> Message-Id: Date: Thu, 04 Jun 2009 10:31:00 -0000 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00064.txt.bz2 > From: "Pierre Muller" > Cc: > Date: Thu, 4 Jun 2009 09:33:06 +0200 > Content-Language: en-us > > My problem is indeed fixed without that part, > but without my change to I386_DR_DISABLE, the second check > in i386_stopped_data_address: > > ALL_DEBUG_REGISTERS(i) > { > if (I386_DR_WATCH_HIT (i) > /* This second condition makes sure DRi is set up for a data > watchpoint, not a hardware breakpoint. The reason is > that GDB doesn't call the target_stopped_data_address > method except for data watchpoints. In other words, I'm > being paranoiac. */ > && I386_DR_GET_RW_LEN (i) != 0) > > is not reliable as the return value of I386_DR_GET_RW_LEN (i) > is non-zero if I was used before... Even if it was disabled > later! This is C: if the result of the first test is false, the result of the second test is not important, right? Or am I missing something?