This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils 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: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, binutils <binutils at sourceware dot org>
- Date: Wed, 11 Mar 2015 17:40:20 -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>
On 03/11/15 15:13, Jan Kratochvil wrote:
On Wed, 11 Mar 2015 00:01:42 +0100, Michael Eager wrote:
Add support to automatically unzip compressed executable and core files.
Files will be uncompressed into temporary directory (/tmp or $TMPDIR)
and are deleted when GDB exits.
Such feature has been requested to support xz-compressed core files as
currently being stored by systemd. But to make it more convenient one should
decompress on-demand only the blocks of file that are really accessed by GDB
- expecting by bfd_iovec. Obviously GDB usually needs to access only small
part of the whole core file.
I did not check how it is supported by gzip but for xz one needs to use
--block-size, otherwise the file blocks cannot be decompressed independently
in random access way.
gzip is not compressed block-by-block. As far as I can tell, you need to
decompress starting from the beginning of the file.
ISTM libz-gzip and liblzma-xz compatibility is mutually exclusive.
I don't know why they would be incompatible, but support for an on-demand
block-compression scheme would be significantly different. Decompressing
an xz file by making a copy (as is done for gzip) would be a simple extension
to the current patch.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077