From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13191 invoked by alias); 7 Mar 2003 14:22:33 -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 13184 invoked from network); 7 Mar 2003 14:22:32 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 7 Mar 2003 14:22:32 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18rKdP-00080x-00 for ; Fri, 07 Mar 2003 10:23:47 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18rIk2-0005Na-00 for ; Fri, 07 Mar 2003 09:22:30 -0500 Date: Fri, 07 Mar 2003 14:22:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: The threads saga: watchpoints Message-ID: <20030307142230.GA20634@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2003-03/txt/msg00129.txt.bz2 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