From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46765 invoked by alias); 12 Mar 2015 17:37:48 -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 46726 invoked by uid 89); 12 Mar 2015 17:37:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: homiemail-a48.g.dreamhost.com Received: from sub5.mail.dreamhost.com (HELO homiemail-a48.g.dreamhost.com) (208.113.200.129) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Mar 2015 17:37:46 +0000 Received: from homiemail-a48.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a48.g.dreamhost.com (Postfix) with ESMTP id 6B6DE4F806A; Thu, 12 Mar 2015 10:37:45 -0700 (PDT) Received: from redwood.eagercon.com (c-24-7-16-38.hsd1.ca.comcast.net [24.7.16.38]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: eager@eagerm.com) by homiemail-a48.g.dreamhost.com (Postfix) with ESMTPSA id 42E2D4F805B; Thu, 12 Mar 2015 10:37:45 -0700 (PDT) Message-ID: <5501CEE9.2060607@eagerm.com> Date: Thu, 12 Mar 2015 17:37:00 -0000 From: Michael Eager User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Jan Kratochvil CC: Pedro Alves , "gdb-patches@sourceware.org" , binutils Subject: Re: [PATCH] Support gzip compressed exec and core files in gdb 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> <20150312171144.GA13600@host1.jankratochvil.net> In-Reply-To: <20150312171144.GA13600@host1.jankratochvil.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00356.txt.bz2 On 03/12/15 10:11, Jan Kratochvil wrote: > 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 Thanks. I'll see if this eliminates the need for the BFD patch. >> 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. This won't tell what flags were used to open the file, so that the same flags can be used on the decompressed file. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077