From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7954 invoked by alias); 9 Feb 2009 07:33:43 -0000 Received: (qmail 7945 invoked by uid 22791); 9 Feb 2009 07:33:42 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.155) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Feb 2009 07:33:34 +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 n197XGtf011848 ; Mon, 9 Feb 2009 08:33:18 +0100 (CET) Received: from mailserver.u-strasbg.fr (ms4.u-strasbg.fr [IPv6:2001:660:2402:d::13]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n197XGNj092416 ; Mon, 9 Feb 2009 08:33:16 +0100 (CET) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n197XE5X099901 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Mon, 9 Feb 2009 08:33:15 +0100 (CET) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: "'Eli Zaretskii'" Cc: References: <000001c98a44$29b02a30$7d107e90$@u-strasbg.fr> In-Reply-To: Subject: RE: [RFA] Use i386_use_watchpoints for go32v2, bds and windows native Date: Mon, 09 Feb 2009 07:33:00 -0000 Message-ID: <000401c98a88$afe4c2c0$0fae4840$@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-02/txt/msg00201.txt.bz2 >From Eli Zaretskii > Envoy=E9=A0: Monday, February 09, 2009 5:10 AM > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: [RFA] Use i386_use_watchpoints for go32v2, bds and windows > native >=20 > > From: "Pierre Muller" > > Date: Mon, 9 Feb 2009 00:22:50 +0100 > > > > The correction of this problem is easy, as it is already > implemented > > for linux. > > The patch only adds > > #define I386_WATCHPOINTS_IN_TARGET_VECTOR > > to all config/i386/nm-*.h > > that defines I386_USE_GENERIC_WATCHPOINTS > > before including nm-i386.h > > and add the corresponding call > > to i386_use_watchpoints (target) > > in the native file when the target vector gets > > defined. > > > > I found only three places where this happens: > > nm-go32.h with native go32-nat.c > > nm-fbsd.h with native i386bsd-nat.c > > and > > nm-cygwin.h and nm-cygwin64.h with native windows-nat.c >=20 > I don't necessarily object, but could you please explain what does > each of these two changes do? That is, what does defining > I386_WATCHPOINTS_IN_TARGET_VECTOR accomplish, and why we need to call > i386_use_watchpoints? The function i386_use_watchpoints simply sets the target vector fields related to hardware watchpoints. But this change alone is useless as the mechanism used to set hardware watchpoints in gdb relies on macros called target_insert_watchpoint or target_remove_watchpoint (plus others), macros that are set in nm-i386.h to call directly i386_insert_watchpoint/i386_remove_watchpoint, unless the macro I386_WATCHPOINTS_IN_TARGET_VECTOR is also defined when parsing that header. If target_xxx_watchpoint are set by nm-i386.h header, 'target remote' or 'target extended-remote' do not work as expected for remote hardware watchpoints because=20 instead of calling remove_insert_watchpoint and similar, which generate the Z2 to Z4 packets, it still calls the native i386_insert_watchpoint. You might argue that this is not very useful for djgpp native, but there are other points in favor of that patch: - the patch removes completely the use of=20 this native definitions of target_xxxx_wqatchpoint macros and are as such supported by the ARI list. - the 'set debug target 1' command also is affected by that patch. Before the patch no watchpoint messages are printed out, while they are after. The above applies to all targets concerned by the patch. By the way, should I split this into three independent=20 patches for each target or is it better if I leave it as=20 one single piece? =20 Pierre Muller Pascal language support maintainer for GDB