From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11418 invoked by alias); 2 Apr 2008 00:17:00 -0000 Received: (qmail 11409 invoked by uid 22791); 2 Apr 2008 00:17:00 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 02 Apr 2008 00:16:40 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id CC54D983BE; Wed, 2 Apr 2008 00:16:38 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 8EA2F98119; Wed, 2 Apr 2008 00:16:38 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Jgqeb-0004nz-Tv; Tue, 01 Apr 2008 20:16:37 -0400 Date: Wed, 02 Apr 2008 12:27:00 -0000 From: Daniel Jacobowitz To: Craig Silverstein Cc: bauerman@br.ibm.com, gdb-patches@sourceware.org Subject: Re: Patch to handle compressed sections Message-ID: <20080402001637.GA18178@caradoc.them.org> Mail-Followup-To: Craig Silverstein , bauerman@br.ibm.com, gdb-patches@sourceware.org References: <20080325230440.BF0623F25D6@localhost> <1206547779.29533.43.camel@localhost.localdomain> <20080326173918.E6D063F25E8@localhost> <20080326180132.GB10127@caradoc.them.org> <20080326183538.346243F25E8@localhost> <20080401140953.GD12753@caradoc.them.org> <20080402000638.1BD1B3F25EF@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080402000638.1BD1B3F25EF@localhost> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes 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 X-SW-Source: 2008-04/txt/msg00034.txt.bz2 On Tue, Apr 01, 2008 at 05:06:38PM -0700, Craig Silverstein wrote: > My plan is to name the new sections .zdebug_foo. They will start with > a 5-byte header that indicates what compression format is being used, > and what version of the format. For now, only ZLIB1 will be > supported. > > Following the ZLIB1 header-field will be an 8-byte length > header-field, in big-endian order -- I know DWARF mostly uses leb128, > but I don't want to add the complexity for people who just want to > parse the header (which, technically, isn't part of dwarf :-) ). > Plus, we don't care much about the space used here. > > Following the length will come the content, which is just a blob of > data compressed by zlib. > > gdb will be changed to look for .zdebug_foo as an alternate to > .debug_foo, and the section-reading code will decompress such sections > at read-time. > > Does this sound like a reasonable plan? If so, I'll try to get a new > patch later this week. Yes, it sounds reasonable - give it a few days in case anyone else has comments? I would have made different choices, but they're not inherently superior. (I'd have used a four-byte magic, and an object-file-endianness 64-bit size; in particular the four-byte magic makes it easier to visually see the size in section dumps.) -- Daniel Jacobowitz CodeSourcery