From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124053 invoked by alias); 12 Mar 2015 17:11:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 124030 invoked by uid 89); 12 Mar 2015 17:11:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 12 Mar 2015 17:11:52 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2CHBnfj016194 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Mar 2015 13:11:49 -0400 Received: from host1.jankratochvil.net ([10.40.204.23]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2CHBj6m012939 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Thu, 12 Mar 2015 13:11:47 -0400 Date: Thu, 12 Mar 2015 17:11:00 -0000 From: Jan Kratochvil To: Michael Eager Cc: Pedro Alves , "gdb-patches@sourceware.org" , binutils Subject: Re: [PATCH] Support gzip compressed exec and core files in gdb Message-ID: <20150312171144.GA13600@host1.jankratochvil.net> References: <54FF77D6.7010400@eagerm.com> <20150311221329.GB11980@host1.jankratochvil.net> <5500E074.6070002@eagerm.com> <55016D6F.4010104@redhat.com> <5501B1EB.5010806@eagerm.com> <5501BB08.90503@redhat.com> <5501C59A.1070405@eagerm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5501C59A.1070405@eagerm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00353.txt.bz2 On Thu, 12 Mar 2015 17:58:02 +0100, Michael Eager wrote: > I misspoke/misremembered. It isn't exec_close() which closes the > file, it is bfd_cache_close_all(). The bfd is not closed, only > the file. This is problematic, I have already posted a pending patch for it: [patch] Do not close BFDs, breaking deleted inferior shlibs https://sourceware.org/ml/gdb-patches/2015-02/msg00367.html > Allowing an opened fd to be passed into BFD makes > doing the decompression in BFD problematic, since BFD doesn't > know where the opened file was found, and the decompress libraries > (at least gzopen()) expects a path, not an opened fd. One can readlink(/proc/self/fd/%d) although I haven't checked now how exactly to use it. Jan