From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16278 invoked by alias); 12 Oct 2004 13:26:22 -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 16247 invoked from network); 12 Oct 2004 13:26:19 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 12 Oct 2004 13:26:19 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CHMfT-00005o-Ao; Tue, 12 Oct 2004 09:26:19 -0400 Date: Tue, 12 Oct 2004 13:26:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com, msnyder@redhat.com Subject: Re: [rfa] Include the LWP in thread-db's PTIDs Message-ID: <20041012132618.GA32588@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com, msnyder@redhat.com References: <20041010213630.GA8218@nevyn.them.org> <416AA623.7080304@gnu.org> <20041011153838.GA26796@nevyn.them.org> <416AB1EE.9000706@gnu.org> <20041011171209.GA32469@nevyn.them.org> <416AD0D0.4010807@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <416AD0D0.4010807@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-10/txt/msg00206.txt.bz2 On Mon, Oct 11, 2004 at 02:28:32PM -0400, Andrew Cagney wrote: > >Also, it was an approved patch. Michael responded at the end of the > >thread saying that he agreed it was the right thing not to use > >thread_db on core files. Yes, there was a lot of disagreement before > >that; but before the patch was committed the thread-db.c maintainer > >agreed that we should not to use thread_db in this case. I think I'm > >justified in saying that "we" have decided this. > > But here on this technical matter I'm not. > > The discussion starts here (there's a bit in the next month): > http://sources.redhat.com/ml/gdb-patches/2001-12/msg00345.html > please read it. Yes, I read that. > Given that this was "hard" Michael approved the change (a sound > technical decision). > > Just like on Solaris and consistent with the original thread, the > user-level thread library should be loaded over the core file as only by > doing that can user-level thread information be displayed. Actually, Michael didn't explain why he changed his mind - he just eventually agreed. Since he's still right here we could ask him :-) but let's just move on. > If this makes cross debugging "iffy", fix the bugs, don't cripple GDB > for it's native users. Some thinking about your messages has persuaded me that you're right that we should support thread-db as a separate stratum and support using it for core files (although I will remain opposed to doing it by default unless someone adds a robust do-this-image-and-library-match check - hmm, maybe it's OK if libc is found from the system location instead of via solib-search-path and solib-absolute-prefix?). However, please stop calling this a "crippling" issue. Can you even list the visible changes that using thread-db would cause over just using corelow's LWP support? As far as I know there are two: - Thread IDs would not be displayed. Since these are pointer-sized numbers internal to the NPTL implementation, that's not much of a loss. - TLS data may not work, because we currently use thread_db to find the thread's TLS base. This could be pretty easily fixed by using a gdbarch mechanism to return the architecture's TLS base and an xfer_partial gdbarch hook to query native or remote targets for the value. -- Daniel Jacobowitz