From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6013 invoked by alias); 11 Dec 2004 18:10:21 -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 5992 invoked from network); 11 Dec 2004 18:10:17 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 11 Dec 2004 18:10:17 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CdBhA-0004Gk-Ht; Sat, 11 Dec 2004 13:10:16 -0500 Date: Sat, 11 Dec 2004 18:50:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: kettenis@gnu.org, jjohnstn@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [RFA]: Modified Watchthreads Patch Message-ID: <20041211181016.GC16131@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , kettenis@gnu.org, jjohnstn@redhat.com, gdb-patches@sources.redhat.com References: <01c4df0c$Blat.v2.2.2$244dda20@zahav.net.il> <20041210230603.GA23419@nevyn.them.org> <01c4df10$Blat.v2.2.2$6f63d1a0@zahav.net.il> <20041210233700.GA24439@nevyn.them.org> <01c4df73$Blat.v2.2.2$5e13b740@zahav.net.il> <200412111433.iBBEXqpN007235@elgar.sibelius.xs4all.nl> <20041211163652.GB13865@nevyn.them.org> <01c4dfa6$Blat.v2.2.2$d4763ba0@zahav.net.il> <20041211173757.GB15506@nevyn.them.org> <01c4dfac$Blat.v2.2.2$25d806e0@zahav.net.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01c4dfac$Blat.v2.2.2$25d806e0@zahav.net.il> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00313.txt.bz2 On Sat, Dec 11, 2004 at 08:05:30PM +0200, Eli Zaretskii wrote: > > Date: Sat, 11 Dec 2004 12:37:57 -0500 > > From: Daniel Jacobowitz > > Cc: kettenis@gnu.org, jjohnstn@redhat.com, gdb-patches@sources.redhat.com > > > > For the Linux kernel, it doesn't matter what you set in that bit. It > > has to clear the registers at task switch anyway, for security reasons. > > This might mean that, in practice, we will need to have some GDB code > to produce an illusion of thread-specific watchpoints on the x86. > That is, the hardware will stop the inferior whenever _any_ thread > hits the watchtpoint, and then GDB will take control, and figure out > whether it needs to stop or continue. Actually, I believe it means the opposite. This is why the registers are supposed to be specific to individual tasks. Remember that in Linux, a task is an LWP, not a "process" - a somewhat mythical beast under Linux. The hardware will stop the particular task that hits the watchpoint; it's GDB that has to stop the other LWPs. -- Daniel Jacobowitz