From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13230 invoked by alias); 11 Dec 2004 17:38:02 -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 13209 invoked from network); 11 Dec 2004 17:37:58 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 11 Dec 2004 17:37:58 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CdBBt-00046g-BO; Sat, 11 Dec 2004 12:37:57 -0500 Date: Sat, 11 Dec 2004 17:53: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: <20041211173757.GB15506@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , kettenis@gnu.org, jjohnstn@redhat.com, gdb-patches@sources.redhat.com References: <41B8E16D.6070505@redhat.com> <20041210191015.GA18430@nevyn.them.org> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01c4dfa6$Blat.v2.2.2$d4763ba0@zahav.net.il> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00307.txt.bz2 On Sat, Dec 11, 2004 at 07:27:26PM +0200, Eli Zaretskii wrote: > > Date: Sat, 11 Dec 2004 11:36:52 -0500 > > From: Daniel Jacobowitz > > Cc: eliz@gnu.org, jjohnstn@redhat.com, gdb-patches@sources.redhat.com > > > > The kernel implementation of hardware watchpoints is very > > platform-dependent because the hardware implementation of hardware > > watchpoints is very platform-dependent. > > ??? Are we still talking about x86? If so, there are only 2 possible > mechanisms I know about: (1) debug registers and (2) page-level > protection. Are there any others? Am I missing something? No, sorry. Mark made general comments about "Linux" so that's what I was responding to. The range of implementations of MIPS hardware watchpoints, for instance, are somewhat different than the i386 ones. You've got the same two options (that is, if your platform has appropriate debug registers), but the features offered by the debug registers can vary. So can their globalness. For instance, a platform which only placed watchpoints on physical addresses instead of virtual addresses would probably not offer thread-specific setting of the watchpoint registers. [Do any platforms do that, and also support SMP? I sure hope not.] > > I would expect that they would always be > > per-thread on any Linux target with true hardware watchpoints. Of > > course, they'll be process global if they're implemented by page > > protections > > The implementation that uses debug registers can be either global or > local, depending on some bit in one of the registers. One thing GDB > should know about a platform is how that platform fiddles with that > bit. 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. I imagine this is true on most other protected, multi-tasking OS's also; am I missing something? -- Daniel Jacobowitz