From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11891 invoked by alias); 13 Sep 2011 16:49:31 -0000 Received: (qmail 11872 invoked by uid 22791); 13 Sep 2011 16:49:27 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Sep 2011 16:49:08 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R3WAV-0002zW-52 from pedro_alves@mentor.com ; Tue, 13 Sep 2011 09:49:07 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 13 Sep 2011 17:49:05 +0100 From: Pedro Alves To: "Ulrich Weigand" Subject: Re: Watchpoint resource accounting broken (Re: [5/6] breakpoints_ops for all kinds of breakpoints: new watchpoints instance type Date: Tue, 13 Sep 2011 17:20:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.0; x86_64; ; ) Cc: Edjunior Barbosa Machado , gdb-patches@sourceware.org References: <201109131522.p8DFMg93032568@d06av02.portsmouth.uk.ibm.com> In-Reply-To: <201109131522.p8DFMg93032568@d06av02.portsmouth.uk.ibm.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109131749.03424.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: 2011-09/txt/msg00216.txt.bz2 On Tuesday 13 September 2011 16:22:42, Ulrich Weigand wrote: > Pedro Alves wrote: > > Does the patch below work? Never consider the current watchpoint when > > going over the breakpoint list counting resources, and then > > add the resources of the current watchpoint on top. This way we > > don't have to care of the current watchpoint being on the list yet or > > not. As bonus, we no longer have to frog the watchpoint's type before > > knowing if it'll fit. > > Yes, this patch looks good to me, and does fix the problem I've > been seeing. Thanks! Thanks to both. I've checked it in now. > It seems to me that it would be preferable to integrate these missing > checks into the code in update_watchpoint, and then remove the > can_use_hardware_watchpoint routine ... Indeed. > [ But that's clearly a follow-on cleanup, and shouldn't prevent your > bug-fix patch from going in now. ] Yep. -- Pedro Alves