From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17997 invoked by alias); 22 Feb 2010 21:12:18 -0000 Received: (qmail 17982 invoked by uid 22791); 22 Feb 2010 21:12:17 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_SORBS_WEB,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Feb 2010 21:12:12 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KY900M00HGONP00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Mon, 22 Feb 2010 23:10:48 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.228.213.68]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KY900J0XHHXEGE0@a-mtaout22.012.net.il>; Mon, 22 Feb 2010 23:10:46 +0200 (IST) Date: Mon, 22 Feb 2010 21:12:00 -0000 From: Eli Zaretskii Subject: Re: read watchpoints don't work on targets that support read watchpoints In-reply-to: <201002222009.39573.pedro@codesourcery.com> To: Pedro Alves Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83mxz1m0x6.fsf@gnu.org> References: <201002180111.31520.pedro@codesourcery.com> <201002212147.44779.pedro@codesourcery.com> <83r5odm5un.fsf@gnu.org> <201002222009.39573.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: 2010-02/txt/msg00558.txt.bz2 > From: Pedro Alves > Date: Mon, 22 Feb 2010 20:09:39 +0000 > > > > + /* Exact match not required. Within range > > > + is sufficient. */ > > > + for (loc = b->loc; loc; loc = loc->next) > > > + if (target_watchpoint_addr_within_range > > > + (¤t_target, > > > + addr, > > > + loc->address, > > > + loc->length)) > > > > And why are we checking watchpoints that couldn't have triggered, > > because they watch a different, albeit close, address? What would be > > the use-case where such a watchpoint could be relevant to deciding > > which watchpoint to announce? > > I'm not sure I understand this question. Does the confusion arise from > the comment quoted above? This is the exact same check > watchpoints_triggered does. ADDR is checked for being in > the [loc->address, loc->address+loc->length) range. If it is, then > watchpoint B is watching ADDR. > > Does this answer your questions? Yes. I forgot that target_stopped_data_address can return an address that is anywhere within the watched region. Sorry, too many years have passed.