From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10671 invoked by alias); 16 Jun 2009 23:46:01 -0000 Received: (qmail 10661 invoked by uid 22791); 16 Jun 2009 23:46:01 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Jun 2009 23:45:49 +0000 Received: (qmail 16349 invoked from network); 16 Jun 2009 23:45:47 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 16 Jun 2009 23:45:47 -0000 From: Pedro Alves To: "Pierre Muller" Subject: Re: [PING][RFA-v2] Fix troubles with watchpoints in DJGPP Date: Tue, 16 Jun 2009 23:46:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org, "'Eli Zaretskii'" References: <001401c9de9f$928b9f80$b7a2de80$@u-strasbg.fr> <200906162359.43456.pedro@codesourcery.com> <000601c9eed8$fcfaa0c0$f6efe240$@u-strasbg.fr> In-Reply-To: <000601c9eed8$fcfaa0c0$f6efe240$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200906170046.22746.pedro@codesourcery.com> 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/msg00420.txt.bz2 On Wednesday 17 June 2009 00:20:06, Pierre Muller wrote: > + =A0/* On systems that load no shared libraries, like DJGPP target, > + =A0 =A0 breakpoint_re_set is never called. > + =A0 =A0 Call it now so that ordinary watchpoints get a chance to > + =A0 =A0 become promoted to hardware watchpoints if the pushed target > + =A0 =A0 supports hardware watchpoints. =A0*/ > + =A0breakpoint_re_set (); > + Much, much better, thanks. "systems that load no shared libraries" still isn't the right predicate, as I demonstrated with the linux static executable, and the breakpoint_re_set call due to adding the vsyscall page's symbols. I'd suggest expanding a bit more. Something like: /* If the user sets watchpoints before execution having started, then she gets software watchpoints, because GDB can't know which target will end up being pushed, or if it supports hardware watchpoints or not. breakpoint_re_set takes care of promoting watchpoints to hardware watchpoints if possible, however, if this new inferior doesn't load shared libraries or we don't pull in symbols from any other source on this target/arch, breakpoint_re_set is never called. Call it now so that software watchpoints get a chance to be promoted to hardware watchpoints if the now pushed target supports hardware watchpoints. */ breakpoint_re_set (); (s/ordinary/software/. There's nothing unordinary about hardware watchpoin= ts) --=20 Pedro Alves