From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15617 invoked by alias); 27 Jul 2011 01:29:31 -0000 Received: (qmail 15604 invoked by uid 22791); 27 Jul 2011 01:29:31 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e24smtp02.br.ibm.com (HELO e24smtp02.br.ibm.com) (32.104.18.86) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Jul 2011 01:29:13 +0000 Received: from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16]) by e24smtp02.br.ibm.com (8.14.4/8.13.1) with ESMTP id p6R2fC81025291 for ; Tue, 26 Jul 2011 23:41:12 -0300 Received: from d24av03.br.ibm.com (d24av03.br.ibm.com [9.8.31.95]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p6R1PZ232908344 for ; Tue, 26 Jul 2011 22:25:35 -0300 Received: from d24av03.br.ibm.com (loopback [127.0.0.1]) by d24av03.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p6R1TIAI031506 for ; Tue, 26 Jul 2011 22:29:18 -0300 Received: from [9.8.1.83] ([9.8.1.83]) by d24av03.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p6R1TIgx031503; Tue, 26 Jul 2011 22:29:18 -0300 Subject: Re: software watchpoints bug (was: Re: x86 watchpoints bug) From: Thiago Jung Bauermann To: Pedro Alves Cc: gdb-patches@sourceware.org, Philippe Waroquiers , yao@codesourcery.com In-Reply-To: <201107262046.19451.pedro@codesourcery.com> References: <201107221740.07110.pedro@codesourcery.com> <1311388735.3205.29.camel@hactar> <201107262046.19451.pedro@codesourcery.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 27 Jul 2011 03:45:00 -0000 Message-ID: <1311730148.12326.2.camel@hactar> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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-07/txt/msg00747.txt.bz2 On Tue, 2011-07-26 at 20:46 +0100, Pedro Alves wrote: > On Saturday 23 July 2011 03:38:55, Thiago Jung Bauermann wrote: > > On Fri, 2011-07-22 at 17:40 +0100, Pedro Alves wrote: > > > > Maybe better would be to change works_in_software_mode_watchpoint to: > > > > > > int > > > works_in_software_mode_watchpoint (const struct breakpoint *b) > > > { > > > - return b->type == bp_hardware_watchpoint; > > > + return (b->type == bp_watchpoint || b->type == bp_hardware_watchpoint); > > > } > > > > Agreed. I would only comment that the parenthesis are not necessary. :-) > > Alright! :-) I've applied the patch below, which does that, and > adds a new test. Great, thanks for the patch. > > Theoretically resources_needed_watchpoint would have to be adapted for > > software watchpoints too, but in practice that function is only called > > in hw_watchpoint_used_count, which is never called with bp_watchpoint as > > an argument. > > > > FWIW, my local branch with my rework of debug registers accounting > > doesn't have hw_watchpoint_used_count anymore. > > Oooh! Is that branch somewhere public? Not yet. I think I just finished ironing out the bugs from my changes related to watchpoints. I'm now starting to work on breakpoints. I was thinking of posting the watchpoints patch as an RFC. I'll rebase the branch on top of current master to get your breakpoint_ops changes (great work BTW) and post it. -- []'s Thiago Jung Bauermann IBM Linux Technology Center