From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31864 invoked by alias); 9 Oct 2003 19:16:48 -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 31783 invoked from network); 9 Oct 2003 19:16:47 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Oct 2003 19:16:47 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h99JGkM07927 for ; Thu, 9 Oct 2003 15:16:46 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h99JGjD23142; Thu, 9 Oct 2003 15:16:45 -0400 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h99JGii31100; Thu, 9 Oct 2003 12:16:44 -0700 Message-ID: <3F85B41B.7010501@redhat.com> Date: Thu, 09 Oct 2003 19:16:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz CC: Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: RFA: Breakpoint infrastructure cleanups [1/8] - define impl_breakpoint References: <20031008170233.GA9013@nevyn.them.org> <3099-Wed08Oct2003195835+0200-eliz@elta.co.il> <20031008191156.GD13579@nevyn.them.org> In-Reply-To: <20031008191156.GD13579@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00304.txt.bz2 Daniel Jacobowitz wrote: > On Wed, Oct 08, 2003 at 07:58:35PM +0200, Eli Zaretskii wrote: > >>>Date: Wed, 8 Oct 2003 13:02:33 -0400 >>>From: Daniel Jacobowitz >>>+ >>>+enum impl_bptype >>>+{ >>>+ impl_bp_software_breakpoint, >>>+ impl_bp_hardware_breakpoint, >>>+ impl_bp_hardware_watchpoint, >>>+ impl_bp_other /* Miscellaneous... */ >>>+}; >> >>Why did you decide to leave the subclasses of hardware watchpoints >>(read, access, and write) in the parent structure, instead of moving >>that distinction here? That seems like you are spreading related >>information between several places instead of having it in a single >>place. > > > I'm actually planning to move it to the impl_breakpoint. I haven't > done it yet because I wanted to postpone watchpoints until the > one-to-many support was in place. > > For instance, according to my interpretation, rwatch **foo should be: > a read watchpoint on the address *foo > a write watchpoint on the address foo, in case it is moved. > I don't know if that matches GDB's current interpreation of such > expressions, though - I haven't looked yet. For software watchpoints, you'd probably just evaluate the expression and see if the result changed. For hardware watchpoints, you'd need to watch every location that would be referenced in evaluating the expression. IMO...