From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28431 invoked by alias); 8 Jun 2009 16:16:47 -0000 Received: (qmail 28385 invoked by uid 22791); 8 Jun 2009 16:16:43 -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.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Jun 2009 16:16:28 +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 n58GGFGL000164 ; Mon, 8 Jun 2009 18:16:15 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [IPv6:2001:660:2402:d::11]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n58GGFdl078335 ; Mon, 8 Jun 2009 18:16:15 +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 n58GGD62086699 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Mon, 8 Jun 2009 18:16:15 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: "'Pedro Alves'" , Cc: "'Eli Zaretskii'" References: <001401c9de9f$928b9f80$b7a2de80$@u-strasbg.fr> <200905280030.28382.pedro@codesourcery.com> In-Reply-To: <200905280030.28382.pedro@codesourcery.com> Subject: [RFA-v2] Fix troubles with watchpoints in DJGPP Date: Mon, 08 Jun 2009 16:16:00 -0000 Message-ID: <006f01c9e854$7295da10$57c18e30$@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/msg00184.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Pedro Alves > Envoy=E9=A0: Thursday, May 28, 2009 1:30 AM > =C0=A0: gdb-patches@sourceware.org > Cc=A0: Pierre Muller (IMAP); 'Eli Zaretskii' > Objet=A0: Re: [RFA] Fix troubles with watchpoints in DJGPP >=20 > On Wednesday 27 May 2009 08:48:49, Pierre Muller (IMAP) wrote: >=20 > > PS-1) Are there not other native targets, without > > dynamic libraries, that will suffer the same troubles? >=20 > I think so. I've just tried on x86_64-linux, with a statically > linked binary (I used gdb.threads/staticthreads, set a watchpoint > on semaphore), and although there are no shared libraries loaded, > the problem is masked by adding the symbols of the vsyscall page > (sysfile-mem.c:add_vsyscall_page). If I hack that function to > do nothing, I see that same thing you're seeing on djgpp. >=20 > Maybe there's a place for a generic fix? Somewhere after > having opened a connection to the target interface. I was > thinking of post_create_inferior, but sounds like opening > a connection to a remote target with "target remote" that > happens to not pull in any more symbols (like most embedded > targets) is having the same problem? Maybe there should be > a target_post_open ... I submit here a more general fix that calls breakpoint_re_set function after the target is pushed in post_create_inferior. This patch works for go32 target, but=20 should work for all other native targets that have no dynamic libraries too. Is this OK? Pierre 2009-06-08 Pierre Muller * infcmd.c (post_create_inferior): Call breakpoint_re_set after target is pushed for watchpoint promotion to hardware watchpoint. Index: src/gdb/infcmd.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/infcmd.c,v retrieving revision 1.245 diff -u -p -r1.245 infcmd.c --- src/gdb/infcmd.c 7 Jun 2009 16:46:48 -0000 1.245 +++ src/gdb/infcmd.c 8 Jun 2009 07:29:43 -0000 @@ -421,6 +421,9 @@ post_create_inferior (struct target_ops=20 #endif } =20 + /* Call breakpoint_re_set to update watchpoints types. */ + breakpoint_re_set (); + observer_notify_inferior_created (target, from_tty); } =20