From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20144 invoked by alias); 6 May 2004 18:05:00 -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 20134 invoked from network); 6 May 2004 18:04:59 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 6 May 2004 18:04:59 -0000 Received: from drow by nevyn.them.org with local (Exim 4.32 #1 (Debian)) id 1BLnEo-0003aC-R7; Thu, 06 May 2004 14:04:50 -0400 Date: Thu, 06 May 2004 18:05:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: orjan.friberg@axis.com, weigand@i1.informatik.uni-erlangen.de, kettenis@chello.nl, gdb-patches@sources.redhat.com Subject: Re: Display of read/access watchpoints when HAVE_NONSTEPPABLE_WATCHPOINT Message-ID: <20040506180450.GA13648@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , orjan.friberg@axis.com, weigand@i1.informatik.uni-erlangen.de, kettenis@chello.nl, gdb-patches@sources.redhat.com References: <200405042208.AAA07379@faui1d.informatik.uni-erlangen.de> <4098A4F6.5020106@axis.com> <20040506142146.GA24608@nevyn.them.org> <2914-Thu06May2004205906+0300-eliz@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2914-Thu06May2004205906+0300-eliz@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-05/txt/msg00154.txt.bz2 On Thu, May 06, 2004 at 08:59:06PM +0200, Eli Zaretskii wrote: > > Date: Thu, 6 May 2004 10:21:46 -0400 > > From: Daniel Jacobowitz > > > > > > Thus, for the STOPPED_BY_WATCHPOINT trick to work, bpstat_stop_status > > > needs to have access to the relevant parts of the inferior's struct > > > execution_control_state variable. It doesn't seem to me too hard to > > > pass that as an additional argument. > > > > This is the point where I want to go back to the "design" bit that Mark > > was talking about. > > Redesigning watchpoint handling doesn't mean we should abandon fixing > bugs in the meantime, IMHO. > > > execution_control_state is private to infrun.c, and > > I would prefer to leave it that way; the more localized it is, the > > easier it is to clean up and maintain, without having to rip tentacles > > out of other parts of GDB. > > Sorry, I don't understand: bpstat_stop_status is called by infrun, so > passing it execution_control_state doesn't violate its being private > to infrun.c. I don't understand your logic. Right now, the type "struct execution_control_state" is private to the file "infrun.c", which is the execution state machine. The function "bpstat_stop_status" is in the file "breakpoint.c", which is the bulk of GDB's breakpoint management code. I'm saying that I don't think exposing the internals of the execution state machine to the separate module responsible for breakpoints, even to a function only used by the execution state machine, is a good idea. If two interfaces of STOPPED_BY_WATCHPOINT need access to something from ecs, then pass it independently, or come up with a better-defined interface. -- Daniel Jacobowitz