From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17370 invoked by alias); 15 Jun 2004 12:22:20 -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 17312 invoked from network); 15 Jun 2004 12:22:18 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 15 Jun 2004 12:22:18 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BaCxE-00089f-Uk; Tue, 15 Jun 2004 08:22:17 -0400 Date: Tue, 15 Jun 2004 12:22:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: Jeff Johnston , gdb-patches@sources.redhat.com Subject: Re: [RFC]: x86 threaded watchpoint support [2/3] Message-ID: <20040615122216.GA31252@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , Jeff Johnston , gdb-patches@sources.redhat.com References: <40CA252E.8050109@redhat.com> <9743-Sat12Jun2004123939+0300-eliz@gnu.org> <40CE1B44.4070708@redhat.com> <8011-Tue15Jun2004071916+0300-eliz@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8011-Tue15Jun2004071916+0300-eliz@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-06/txt/msg00348.txt.bz2 On Tue, Jun 15, 2004 at 07:19:17AM +0200, Eli Zaretskii wrote: > > Date: Mon, 14 Jun 2004 17:40:20 -0400 > > From: Jeff Johnston > > > > The change is needed because with the threading model, you can have multiple > > events to process. So, if you check your watchpoint values, all of them may > > have changed but you end up reporting an invalid thread location. For example, > > I was getting watchpoints changing at the same time of a new thread event (it > > couldn't discern). The reported location was __nptl_create_event (not very > > useful). > > Does this mean that when a watchpoint breaks, it stops only the thread > that hit the watchpoint, while other threads continue to run? > > If all threads stop, then there could not be multiple events, unless > we are talking about a machine with more than one CPU. > > Or am I missing something? It's the same problem we already have, just more likely to trigger. The kernel does not stop threads for us; we do it ourselves after we see the first thread trap. Even if the kernel did it, there would be a substantial window for other threads to run. So any time that we see an event from one thread, there can be an arbitrary set of events from other threads. In a heavily threaded application, having extra events at the thread creation breakpoint is typical. -- Daniel Jacobowitz