From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2927 invoked by alias); 30 Sep 2002 05:40:20 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 2919 invoked from network); 30 Sep 2002 05:40:19 -0000 Received: from unknown (HELO is.elta.co.il) (199.203.121.2) by sources.redhat.com with SMTP; 30 Sep 2002 05:40:19 -0000 Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id HAA25690; Mon, 30 Sep 2002 07:37:21 +0200 (IST) Date: Sun, 29 Sep 2002 22:40:00 -0000 From: Eli Zaretskii X-Sender: eliz@is To: Andrew Cagney cc: gdb-patches@sources.redhat.com Subject: Re: [rfa:breakpoint] Correctly count watchpoints In-Reply-To: <3D97C64D.5060108@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-09/txt/msg00744.txt.bz2 On Sun, 29 Sep 2002, Andrew Cagney wrote: > (per earlier post) An expression like: > > a + b > > requires two watchpoint resources (&a and &b). What do you mean by ``watchpoint resources''? On a i386, watching &a might require much more than a single debug register, depending on a's size and alignment. > When first creating the > watchpoint, gdb correctly counts this as two. However, when GDB goes > back to compute the number of watchpoints already used, it does a > re-count and treats the above (and any watchpoint expression) as only one. > > The attached, I belive, fixes this by saving the mem_cnt that was computed. I agree that the count should at least be consistent. > One thing I wonder about though, should ``info breakpoints'' or ``maint > info breakpoints'' display this info? Only if it's useful. Could you please make a concrete suggestion as to what should be printed about this information? > Ok? Fine with me.