This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Support gzip compressed exec and core files in gdb


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]