From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2110 invoked by alias); 30 Dec 2009 19:07:05 -0000 Received: (qmail 2098 invoked by uid 22791); 30 Dec 2009 19:07:04 -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 19:06:58 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 52CA72BABA8; Wed, 30 Dec 2009 14:06:56 -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 49WXkDijbdML; Wed, 30 Dec 2009 14:06:56 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id D1DFE2BAB64; Wed, 30 Dec 2009 14:06:55 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 01237F5937; Wed, 30 Dec 2009 20:06:26 +0100 (CET) Date: Wed, 30 Dec 2009 19:07:00 -0000 From: Joel Brobecker To: Thiago Jung Bauermann Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Fix hw watchpoint count in update_watchpoint Message-ID: <20091230190626.GG2788@adacore.com> References: <200912301446.48771.bauerman@br.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200912301446.48771.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/msg00443.txt.bz2 > 20090-12-30 Jan Kratochvil > Thiago Jung Bauermann > > * breakpoint.c (update_watchpoint): Change b->type to > bp_watchpoint before calling hw_watchpoint_used_count. Look good, please go ahead and commit. If I could just expand a little on your comment, if you don't mind: > + /* Mark as software watchpoint to ensure that this watchpoint > + will not be counted in the hw_watchpoint_used_count call > + below. */ /* We need to determine how many resources are already used for all other hardware watchpoints to see if we still have enough resources to also fit this watchpoint in as well. To avoid the hw_watchpoint_used_count call below from counting this watchpoint, make sure that it is marked as a software watchpoint. */ This is only a suggestion, so if you don't like it, please commit your version, and I'll see if I can suggest an update separately. Thanks for submitting the patch! (and welcome back, it's been a while) -- Joel