This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Support gzip compressed exec and core files in gdb
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Michael Eager <eager at eagerm dot com>
- Cc: Pedro Alves <palves at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, binutils <binutils at sourceware dot org>
- Date: Thu, 12 Mar 2015 18:11:44 +0100
- Subject: Re: [PATCH] Support gzip compressed exec and core files in gdb
- Authentication-results: sourceware.org; auth=none
- References: <54FF77D6 dot 7010400 at eagerm dot com> <20150311221329 dot GB11980 at host1 dot jankratochvil dot net> <5500E074 dot 6070002 at eagerm dot com> <55016D6F dot 4010104 at redhat dot com> <5501B1EB dot 5010806 at eagerm dot com> <5501BB08 dot 90503 at redhat dot com> <5501C59A dot 1070405 at eagerm dot com>
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
> 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.