This is the mail archive of the mailing list for the GDB 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 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
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

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