From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20874 invoked by alias); 11 Oct 2004 15:29:14 -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 20856 invoked from network); 11 Oct 2004 15:29:13 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 11 Oct 2004 15:29:13 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i9BFTB1q000697 for ; Mon, 11 Oct 2004 11:29:13 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9BFT9r06866; Mon, 11 Oct 2004 11:29:10 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id D94D428CD; Mon, 11 Oct 2004 11:26:27 -0400 (EDT) Message-ID: <416AA623.7080304@gnu.org> Date: Mon, 11 Oct 2004 15:29:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20041009 MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com, msnyder@redhat.com Subject: Re: [rfa] Include the LWP in thread-db's PTIDs References: <20041010213630.GA8218@nevyn.them.org> In-Reply-To: <20041010213630.GA8218@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00193.txt.bz2 > At one time, I believe that thread-db.c was planned to support the full > range of features supported by the libthread_db interface, presumably as > defined by Sun's implementation. That never panned out, and while non-1:1 > support did work at one point, I don't think it has in a long while. If it > was wanted, I wouldn't re-implement it the same way. So this patch begins > the process of removing unneeded generality from thread-db. In particular, > while thread-db will still compute the TID, the mapping of threads to LWPs > will be considered fixed. JeffJ's been in a constant fight with that one. > My goal is to have a GNU/Linux target vector, whose entry points call into > thread-db when necessary, instead of having a thread-db wrapper around all > the GNU/Linux methods. One of the things this will fix is the need for two > separate versions of the GNU/Linux native wait() code - we will always use > the multi-threaded-aware version. Another thing it will fix is a bug in the > fork-following code which tries to find the LWP from a thread ID. Per the changes I've been making, yes, there needs to be a single inf-linux inferior (derived from inf-ptrace?) that always has the LWP code enabled(1). thread-db is more interesting. As a user-level thread model, yes it is GNU/Linux specific and should be consolidated - linux-nptl say? However, as with many systems, GNU/Linux needs to be able to support multiple user-level thread models (e.g., Ada's tasks), and be able to layer each of those user-level thread models over more than just inf-linux (esp corefiles). Consequently, linux-nptl can't be folded into inf-linux, and the indirection provided by the thread-stratum needs to be retained. Andrew (1) Have you noticed now the lin_lwp inferior uses /proc for memory accesses yet the default vector does not?