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


} I think we have to do this.  It's unfriendly to consumers to have
} the section have an unpredictable name

Yeah, that's a fair point.  OK, I'll rewrite it.

It's a bit of a pain to change formats -- especially with gold already
released to support the old format -- so I'd like to pass the new
format by you guys before I implement it.

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.

craig


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