From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16647 invoked by alias); 17 Jun 2009 22:44:56 -0000 Received: (qmail 16638 invoked by uid 22791); 17 Jun 2009 22:44:56 -0000 X-SWARE-Spam-Status: No, hits=-51.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Jun 2009 22:44:50 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n5HMiRa7027938; Wed, 17 Jun 2009 18:44:27 -0400 Received: from greed.delorie.com (vpn-12-151.rdu.redhat.com [10.11.12.151]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5HMiQVA008339; Wed, 17 Jun 2009 18:44:27 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1] (may be forged)) by greed.delorie.com (8.14.3/8.14.3) with ESMTP id n5HMiQsA024724; Wed, 17 Jun 2009 18:44:26 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.3/8.14.3/Submit) id n5HMiQhi024721; Wed, 17 Jun 2009 18:44:26 -0400 Date: Wed, 17 Jun 2009 22:44:00 -0000 Message-Id: <200906172244.n5HMiQhi024721@greed.delorie.com> From: DJ Delorie To: Joel Brobecker CC: gdb-patches@sourceware.org In-reply-to: <20090617123152.GA7582@adacore.com> (message from Joel Brobecker on Wed, 17 Jun 2009 05:31:53 -0700) Subject: Re: [PING][RFA-v2] Fix troubles with watchpoints in DJGPP References: <001401c9de9f$928b9f80$b7a2de80$@u-strasbg.fr> <200906162359.43456.pedro@codesourcery.com> <000601c9eed8$fcfaa0c0$f6efe240$@u-strasbg.fr> <200906170046.22746.pedro@codesourcery.com> <20090617123152.GA7582@adacore.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/msg00460.txt.bz2 > > /* 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 (); > > Best Comment Of The Year Award! I love comments like these. Agreed. I tell people I'm mentoring, comments should explain *why*, the code already says *what*. This is an excellent example of that.