From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80703 invoked by alias); 11 Mar 2015 18:24:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 80683 invoked by uid 89); 11 Mar 2015 18:24:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-qg0-f42.google.com Received: from mail-qg0-f42.google.com (HELO mail-qg0-f42.google.com) (209.85.192.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 11 Mar 2015 18:24:18 +0000 Received: by qgfi50 with SMTP id i50so12171134qgf.10 for ; Wed, 11 Mar 2015 11:24:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=BLFbFM0StZrPnrphy4Ot0EZwjW0t0AIfrkuCgeUTXhk=; b=jFNXhkVdY8IlLpUF0+MBZcnLOXdMlsz9hXInc5LtbprCkEezg4qRy4YMGeIeIiWVhc +d24PhYuNlWSD1TE7Q8YmVF43+wC5evr70Y2nwgZIkjBhra4hh9aQoyKu5TGXHVIzhce 6tyz6IT7cQ6U2VjbpnCnMuxjHEMFnASLhIEeANAynbG2rxVoEqesmaoHztI5mRvM53NG UoetbDNfTlIDzToXJMbD5mVYtgFuhh/iVsgofthjG0VnCUu8G7bpSY0vxZbEKkj8c7o9 ooEX8plQ49iR//iRQX+NAsrnpuxsSYRhxGIiF6z8/HrJuP8r5J13Y5L/+MF04JNFICEJ +d/A== X-Gm-Message-State: ALoCoQki+O4G7Qj+HRm3LfR0NfT9zIcNjQbgt3TRCsyA3xxtq3HdymK2Jl/pJnO6cAXATtLyzYWt MIME-Version: 1.0 X-Received: by 10.229.4.4 with SMTP id 4mr47220875qcp.8.1426098256129; Wed, 11 Mar 2015 11:24:16 -0700 (PDT) Received: by 10.140.83.81 with HTTP; Wed, 11 Mar 2015 11:24:16 -0700 (PDT) In-Reply-To: <54FF77D6.7010400@eagerm.com> References: <54FF77D6.7010400@eagerm.com> Date: Wed, 11 Mar 2015 18:24:00 -0000 Message-ID: Subject: Re: [PATCH] Support gzip compressed exec and core files in gdb From: Cary Coutant To: Michael Eager Cc: "gdb-patches@sourceware.org" , binutils Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00314.txt.bz2 How will this affect split DWARF? If you uncompress a foo.gz binary, and the binary has relative paths to .dwo files, will GDB look for the .dwo files relative to the original binary, or to the uncompressed binary? When it looks for a .dwp file, will it look for foo.dwp or foo.gz.dwp, and will it look in the same directory as the original, or in /tmp? If foo.dwp is also compressed, will it uncompress that? Would it make sense to support .tar.gz/.tgz files containing both a binary and its .dwp? -cary On Tue, Mar 10, 2015 at 4:01 PM, 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. This should be transparent to users, > except for disk space requirements. The name of the uncompressed file is > mentioned, but all references to the file in GDB messages is to the file > which the user specified. > > This operation cannot be done completely by BFD because BFD allows an opened > file to be passed to it for processing. GDB uses this functionality. > > BFD: > * bfd-in2.h: Regenerate. > * bfd.c (struct bfd): Add uncompressed_filename. > * bfdio.c (bfd_get_mtime): Set bfd->mtime_set to true. > * cache.c (bfd_open): Open previously created uncompressed file. > > GDB: > * common/filestuff.c (struct compressed_file_cache_search, > eq_compressed_file, > is_gzip, decompress_gzip, do_compressed_cleanup, gdb_uncompress): New. > * common/filestuff.h (gdb_uncompress): Declare. > * corelow.c (core_open): Uncompress core file. > * exec.c (exec_file_attach): Uncompress exe file. > * symfile.c (symfile_bfd_open): Uncompress sym (exe) file. > > GDB/DOC: > * gdb.texinfo: Mention gzipped exec and core files. > > -- > Michael Eager eager@eagercon.com > 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077