From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29517 invoked by alias); 1 Feb 2003 13:22:13 -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 29509 invoked from network); 1 Feb 2003 13:22:12 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.212) by 172.16.49.205 with SMTP; 1 Feb 2003 13:22:12 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6/8.12.5) with ESMTP id h11DM3x6000503; Sat, 1 Feb 2003 14:22:03 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6/8.12.6) with ESMTP id h11DM2uj000996; Sat, 1 Feb 2003 14:22:03 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6/8.12.6/Submit) id h11DM21X000993; Sat, 1 Feb 2003 14:22:02 +0100 (CET) To: "J. Johnston" Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: Patch for corefile support References: <3E35BB3A.2020003@redhat.com> From: Mark Kettenis Date: Sat, 01 Feb 2003 13:22:00 -0000 In-Reply-To: "J. Johnston"'s message of "Mon, 27 Jan 2003 18:05:30 -0500" Message-ID: <86bs1wp24l.fsf@elgar.kettenis.dyndns.org> X-SW-Source: 2003-02/txt/msg00022.txt.bz2 "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. Mark