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 Wed, Mar 26, 2008 at 11:35:38AM -0700, Craig Silverstein wrote:
> } Or in the beginning of .debug_info.zlib?  (.zdebug_info?)
> 
> I thought of that too, but again I didn't see much benefit.  On the
> other hand, there is a cost (albeit small): now you have a "format"
> for compressed data, with a header section and data to follow, so you
> need to codify and document the header format, and deal with issues
> like 4-byte vs 8-byte and endianness, and then you'll probably want a
> version, and things just get very complicated.  I like the simplicity
> of saying the section is just a blob of compressed data.

I think we have to do this.  It's unfriendly to consumers to have the
section have an unpredictable name; pattern matching in GDB is not
hard, but e.g. a script which uses -R .debug_info will now need to
script readelf -WS to find the name of the compressed section.

A magic string ("ZLIB"?) and an 8-byte length should be all the
header we need.

-- 
Daniel Jacobowitz
CodeSourcery


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