From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32610 invoked by alias); 17 Dec 2001 01:58:01 -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 32504 invoked from network); 17 Dec 2001 01:56:44 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 17 Dec 2001 01:56:44 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16Fn1G-0001Co-00; Sun, 16 Dec 2001 20:56:42 -0500 Date: Sun, 16 Dec 2001 17:58:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Don't use thread_db on corefiles Message-ID: <20011216205642.A4358@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <20011213114847.A17989@nevyn.them.org> <3C18FA17.6030603@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C18FA17.6030603@cygnus.com> User-Agent: Mutt/1.3.23i X-SW-Source: 2001-12/txt/msg00416.txt.bz2 On Thu, Dec 13, 2001 at 10:57:27AM -0800, Andrew Cagney wrote: > >This patch fixes a really frustrating internal error when you open the > >coredump of a multithreaded application. Depending on your kernel, either > >the core has threads (corefile.c supports this just fine) or it doesn't. > >Neither way will opening libthread_db work right. corelow.c, rather. > Daniel, can you explain the problem? Thread-db should work on core > files (or realize it is silly and not open its self). Right now, even after the event reporting issues, thread-db will not work with core files. The problem is that corefile.c adds the threads to the thread list itself - and then thread_db finds them all and adds them again. One or the other needs to go. If both try to add the threads they'll step all over each other. My instinct was "there is support in corefile-specific code for handling threads. It works just fine; use it." It's been there since 1993. Does it have any current consumers? I think it must, since Kevin touched it in May and mentioned some sort of regressions. But Linux has never produced these before and Solaris has its own handling. Does AIX maybe? Since the overwhelming response seems to be that thread-db should be doing this, and I can't make that happen without gutting corelow and I have no idea what platforms that use that support, I'm going to leave this alone unless someone else has a good idea. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer