This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Support gzip compressed exec and core files in gdb
- From: Michael Eager <eager at eagerm dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat 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 10:37:45 -0700
- 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> <20150312171144 dot GA13600 at host1 dot jankratochvil dot net>
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
This is problematic, I have already posted a pending patch for it:
[patch] Do not close BFDs, breaking deleted inferior shlibs
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 email@example.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077