From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18913 invoked by alias); 10 Dec 2004 23:31:54 -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 18632 invoked from network); 10 Dec 2004 23:31:28 -0000 Received: from unknown (HELO legolas.inter.net.il) (192.114.186.24) by sourceware.org with SMTP; 10 Dec 2004 23:31:28 -0000 Received: from zaretski (IGLD-83-130-247-149.inter.net.il [83.130.247.149]) by legolas.inter.net.il (MOS 3.5.5-GR) with ESMTP id DHT02433 (AUTH halo1); Sat, 11 Dec 2004 01:30:42 +0200 (IST) Date: Fri, 10 Dec 2004 23:37:00 -0000 From: "Eli Zaretskii" To: Daniel Jacobowitz Message-ID: <01c4df10$Blat.v2.2.2$6f63d1a0@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 CC: jjohnstn@redhat.com, gdb-patches@sources.redhat.com In-reply-to: <20041210230603.GA23419@nevyn.them.org> (message from Daniel Jacobowitz on Fri, 10 Dec 2004 18:06:03 -0500) Subject: Re: [RFA]: Modified Watchthreads Patch Reply-to: Eli Zaretskii References: <41B8E16D.6070505@redhat.com> <20041210191015.GA18430@nevyn.them.org> <01c4df0c$Blat.v2.2.2$244dda20@zahav.net.il> <20041210230603.GA23419@nevyn.them.org> X-SW-Source: 2004-12/txt/msg00284.txt.bz2 > Date: Fri, 10 Dec 2004 18:06:03 -0500 > From: Daniel Jacobowitz > Cc: jjohnstn@redhat.com, gdb-patches@sources.redhat.com > > Does the i386 native watchpoint support work on any existing target > with multiple threads? I don't know, but if it does, it's more through luck than through correct code. > That is not a problem with the i386 native support for watchpoints; it > is a problem with the core GDB interfaces for watchpoints I don't know if it is a problem with the GDB interface; it might be. For the x86 native code, I _know_ it's a problem, because the code was designed and written assuming that watchpoints are not thread-local. I'm not opposed to rethinking the core GDB watchpoint interface as well, but doing that is a much harder job, because we need to analyze how various debug interfaces on various platforms can help us know what thread hit the watchpoint. Only then we can come up with a viable design. > If you don't think we can support multi-threaded watchpoints in GDB > without doing this redesign first, do you object to Jeff's current > patch? You may recall that I objected to using observers for this in the first place, but my objections were voted down. Given that, I don't find it useful to object to Jeff's current patch. But I will encourage any attempts to refactor the watchpoint interfaces and x86 native code to accomodate multi-threaded programs, even if in the meantime we approve some changes that patch around the inappropriate design to get thread-local watchpoints on some platforms. > To get a useful level of support from the i386 watchpoint code, in > fact, looks pretty easy. It may be easy, but I think we still need to talk about the design. The debug registers mirroring in i386-nat.c clearly assume that debug registers are all global. This might not work at all with threads.