This is the mail archive of the
mailing list for the GDB project.
Re: Patch to handle compressed sections
- From: Daniel Jacobowitz <drow at false dot org>
- To: Craig Silverstein <csilvers at google dot com>
- Cc: bauerman at br dot ibm dot com, gdb-patches at sourceware dot org
- Date: Tue, 1 Apr 2008 10:09:53 -0400
- Subject: Re: Patch to handle compressed sections
- References: <20080325230440.BF0623F25D6@localhost> <email@example.com> <20080326173918.E6D063F25E8@localhost> <20080326180132.GB10127@caradoc.them.org> <20080326183538.346243F25E8@localhost>
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.