From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21605 invoked by alias); 7 Mar 2003 14:43:07 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21598 invoked from network); 7 Mar 2003 14:43:06 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 7 Mar 2003 14:43:06 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18rKxJ-00083U-00 for ; Fri, 07 Mar 2003 10:44:21 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18rJ3x-0005UZ-00 for ; Fri, 07 Mar 2003 09:43:05 -0500 Date: Fri, 07 Mar 2003 14:43:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: The threads saga: watchpoints Message-ID: <20030307144305.GA21046@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <20030307142230.GA20634@nevyn.them.org> <15976.44957.749731.971900@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15976.44957.749731.971900@localhost.redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-03/txt/msg00134.txt.bz2 On Fri, Mar 07, 2003 at 09:41:33AM -0500, Elena Zannoni wrote: > Daniel Jacobowitz writes: > > It was pointed out to me today that watchpoints and threads really don't get > > along. It's even in the manual: > > > > _Warning:_ In multi-thread programs, watchpoints have only limited > > usefulness. With the current watchpoint implementation, GDB can > > only watch the value of an expression _in a single thread_. If > > you are confident that the expression can only change due to the > > current thread's activity (and if you are also confident that no > > other thread can become current), then you can use watchpoints as > > usual. However, GDB may not notice when a non-current thread's > > activity changes the expression. > > > > > > I think some of our hardware breakpoint implementations have the same issue. > > > > It seems to me that, in general, this should be pretty easy to fix. But it > > requires some definite changes in the current infrastructure. Shouldn't we > > be able to insert the watchpoint in all threads? > > > > -- > > Daniel Jacobowitz > > MontaVista Software Debian GNU/Linux Developer > > > There was a discussion on this some time ago: > > http://sources.redhat.com/ml/gdb-patches/2002-01/msg00383.html > and follow-ups. Thanks! I missed that one. I think that perhaps I should audit the available hardware watchpoint mechanisms for similar problems... -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer