From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7891 invoked by alias); 1 Feb 2003 17:00:11 -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 7843 invoked from network); 1 Feb 2003 17:00:10 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 1 Feb 2003 17:00:10 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18f2sr-0006uh-00; Sat, 01 Feb 2003 13:00:57 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18f10U-0007iN-00; Sat, 01 Feb 2003 12:00:42 -0500 Date: Sat, 01 Feb 2003 17:00:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: "J. Johnston" , gdb-patches@sources.redhat.com Subject: Re: RFA: Patch for corefile support Message-ID: <20030201170042.GB29615@nevyn.them.org> Mail-Followup-To: Mark Kettenis , "J. Johnston" , gdb-patches@sources.redhat.com References: <3E35BB3A.2020003@redhat.com> <86bs1wp24l.fsf@elgar.kettenis.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86bs1wp24l.fsf@elgar.kettenis.dyndns.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-02/txt/msg00026.txt.bz2 On Sat, Feb 01, 2003 at 02:22:02PM +0100, Mark Kettenis wrote: > "J. Johnston" writes: > > > The attached patch fixes a problem in gdb when a corefile is read in > > after a multithreaded application has been debugged. What happens is that > > the thread-db and lin-lwp layers are still around and run into internal > > errors. > > > > The solution is simply to unpush the thread-db ops in its mourn_inferior > > routine. If a corefile gets loaded, there is no thread-db to interfere. > > If another multi-threaded app gets loaded, the thread_db_new_objfile is > > designed to bring back the thread-db layer as needed. > > > > This fix solves another failure in the killed.exp testsuite as well. > > > > Ok to commit? > > Sorry, no. AFAICT this will break debugging programs that are > statically linked against libpthread. As a minimum, this code should > check keep_thread_db before unpushing the target, but even then, I'm > not sure whether this is really OK. Programs statically linked against libpthread are already broken. I have a patch to fix it, but it's so gross that I haven't posted it; I still can't think of a good way to do it. Given the way GDB treats targets, we seem to be waffling; someone fixes core file support and breaks static binaries, or vice versa. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer