From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15198 invoked by alias); 30 Dec 2009 05:02:43 -0000 Received: (qmail 15140 invoked by uid 22791); 30 Dec 2009 05:02:41 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Dec 2009 05:02:33 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 76E5D2BABC2; Wed, 30 Dec 2009 00:02:31 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zy6Mi+JniNU2; Wed, 30 Dec 2009 00:02:31 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id A23F12BABB0; Wed, 30 Dec 2009 00:02:30 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id EE1AAF5937; Wed, 30 Dec 2009 06:02:01 +0100 (CET) Date: Wed, 30 Dec 2009 05:02:00 -0000 From: Joel Brobecker To: Thiago Jung Bauermann Cc: Eli Zaretskii , gdb-patches@sourceware.org, luisgpm@linux.vnet.ibm.com, tyrlik@us.ibm.com Subject: Re: [PATCH 1/2] Support the new PPC476 processor -- Arch Independent Message-ID: <20091230050201.GB2788@adacore.com> References: <200912161847.19433.sergiodj@linux.vnet.ibm.com> <83vdg45xkx.fsf@gnu.org> <200912292359.32931.bauerman@br.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200912292359.32931.bauerman@br.ibm.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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-12/txt/msg00427.txt.bz2 > > > + /* We have to temporary disable this watchpoint, otherwise > > > + we will count it twice (once as being inserted, and once > > > + as a watchpoint that we want to insert). */ > > > + e = b->enable_state; > > > + b->enable_state = bp_disabled; > > > > What's the story behind the need to temporarily disabling this > > watchpoint? > > This is a fix for an actual bug in the current GDB code. Jan suggested an > improved fix. I'll post this chunk as a separate patch, and explain the > issue there. Please do! :-) I just noticed that bug yesterday, and came up with yet another fix (which is the worse of all suggestions made so far, so I won't send it, after all [had everything ready to go, I was just waiting for our nightly build results to come back and some of them take more than 24h]). You and I are probably the only ones who care, because most of the watchpoint implementations I looked at were just ignoring the count and always returning either 1 (ok) or 0 (no more resource). -- Joel