This is the mail archive of the gdb-patches@sourceware.org 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 to handle compressed sections


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


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