From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18842 invoked by alias); 7 Mar 2003 14:37:34 -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 18833 invoked from network); 7 Mar 2003 14:37:33 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 7 Mar 2003 14:37:33 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h27EbXQ15020 for ; Fri, 7 Mar 2003 09:37:33 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h27EbXV03711 for ; Fri, 7 Mar 2003 09:37:33 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h27EbWC22382 for ; Fri, 7 Mar 2003 09:37:33 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 934C2FF79; Fri, 7 Mar 2003 09:41:34 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15976.44957.749731.971900@localhost.redhat.com> Date: Fri, 07 Mar 2003 14:37:00 -0000 To: Daniel Jacobowitz Cc: gdb@sources.redhat.com Subject: Re: The threads saga: watchpoints In-Reply-To: <20030307142230.GA20634@nevyn.them.org> References: <20030307142230.GA20634@nevyn.them.org> X-SW-Source: 2003-03/txt/msg00132.txt.bz2 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. elena