From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21390 invoked by alias); 11 Oct 2004 18:29:07 -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 21379 invoked from network); 11 Oct 2004 18:29:04 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 11 Oct 2004 18:29:04 -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 i9BISv5k020868 for ; Mon, 11 Oct 2004 14:29:04 -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 i9BIStr31499; Mon, 11 Oct 2004 14:28:55 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 0762428CD; Mon, 11 Oct 2004 14:28:33 -0400 (EDT) Message-ID: <416AD0D0.4010807@gnu.org> Date: Mon, 11 Oct 2004 18: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> <416AA623.7080304@gnu.org> <20041011153838.GA26796@nevyn.them.org> <416AB1EE.9000706@gnu.org> <20041011171209.GA32469@nevyn.them.org> In-Reply-To: <20041011171209.GA32469@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00200.txt.bz2 > On Mon, Oct 11, 2004 at 12:16:46PM -0400, Andrew Cagney wrote: > >>>> >I hadn't thought about the core issue; I'll do some pondering. However, >>>> >I don't think your comment is quite right. Thread_db can not be >>>> >layered over core files, we've already decided that - it's too iffy to >>>> >find the right thread_db, not to mention cross-debugging issues. And >>>> >similarly we can't use it for remote thread debugging. Thread_db only >>>> >makes any sense on top of local, running, native threads. >> >>> >>> "we"'ve definitly not decided this. >>> >>> Long ago you committed a hack to stop GDB layering thread-db over core >>> files. It was to stop GDB barfing on native GNU/Linux core files. It >>> had the side effect of breaking threads on all other systems, namely >>> solaris. What keeps being pointing out is that thread-db should be >>> loaded over a core file, and not doing it is broken. >>> >>> If we try it and it barfs, we've a bug. But what we've not got is an >>> excuse for hobble native support (just because embedeed debuging is "iffy"). > > > Huh? It was a change to thread-db.c which has never been used for > Solaris, so I haven't got any idea what you are talking about. I did > not break Solaris threads. Then on that front, then I'm now wrong (and not shy in admitting it ;-) ("but" in my defence at the time the expectation was that thread-db.c would be used by solaris :-). > 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. Your position was that: > On Thu, Dec 13, 2001 at 06:56:36PM -0500, Daniel Jacobowitz wrote: >> Thread_db, as things stand, does not work on core files. Is preventing >> it from trying, and thus crashing GDB, really such a disruptive >> suggestion? > > OK, that came out a little harsher than I really wanted it. Sorry. > > I'd like to apply this patch and then add an entry to TODO about > how it "should be done". Is that better? because: >> Sounds like that is the bug to fix. Enabling event reporting probably >> doesn't make much sense when the target is lifeless. > > I was about to try a patch for this when I realized that my primary > objection still holds. > > This only works if you're debugging on a very similar host to the one > the core was dumped on. If you've got, say, a glibc 2.1.3 host and are > looking at a glibc 2.2.3 core... well, you can provide target libraries > and make GDB use those, but there's no way to provide a cross > libthread_db. 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. If this makes cross debugging "iffy", fix the bugs, don't cripple GDB for it's native users. Andrew