From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25741 invoked by alias); 4 Jun 2009 07:33:25 -0000 Received: (qmail 25733 invoked by uid 22791); 4 Jun 2009 07:33:24 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Jun 2009 07:33:19 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id n547X757042978 ; Thu, 4 Jun 2009 09:33:07 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n547X7pV030781 ; Thu, 4 Jun 2009 09:33:07 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (www-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n547X6gM081601 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Thu, 4 Jun 2009 09:33:07 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: "'Eli Zaretskii'" Cc: References: <000301c9e49e$c479eba0$4d6dc2e0$@u-strasbg.fr> <000601c9e4a3$b2f2f980$18d8ec80$@u-strasbg.fr> <000001c9e4de$6e550cb0$4aff2610$@u-strasbg.fr> In-Reply-To: Subject: RE: [RFA-v2] Fix a windows bug if two watchpoints are used Date: Thu, 04 Jun 2009 07:33:00 -0000 Message-ID: <000301c9e4e6$b40c5d50$1c2517f0$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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/msg00062.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Eli Zaretskii > Envoy=E9=A0: Thursday, June 04, 2009 9:12 AM > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: [RFA-v2] Fix a windows bug if two watchpoints are used >=20 > > From: "Pierre Muller" > > Cc: > > Date: Thu, 4 Jun 2009 08:33:52 +0200 > > Content-Language: en-us > > > > Considering the objections to my first patch, I > > here submit another patch that > > make i386_stopped_data_address > > return as soon as one hit is found. >=20 > This part is fine with me. >=20 > > The change in I386_DR_DISABLE is still > > useful for the second test inside the i386_stopped_data_address > > function. >=20 > What do we need that for? Does the Intel spec say that these its need > to be zeroed for disabled debug registers? >=20 > > This patch does fix my windows specific problem. >=20 > Is your problem fixed without the change in I386_DR_DISABLE? 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) !=3D 0) is not reliable as the return value of I386_DR_GET_RW_LEN (i)=20 is non-zero if I was used before... Even if it was disabled later! Pierre