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 1/3] simplify decompression code


>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> While working on PR 14704, I realized that BFD has its own code to
Tom> decompress section data.  This code is enabled under the same
Tom> conditions that the zlib code in gdb is enabled.

Digging a little deeper, I found a couple issues with this patch, both
in BFD.

First, BFD then leaks the uncompressed section data.  This is just a bug
in bfd_get_full_section_contents, I have a patch I'll send to binutils@.

Second, if the section is compressed, then BFD stashes a copy of the
uncompressed data.  For gdb this means that we effectively have two
copies of the data: one in section->contents and one that gdb manages.
This is bad, since we read many possibly-large sections.  So, I think I
will write another patch to BFD to let us control this somehow.

I'm not sure exactly what form this will take, but it will require some
small tweak to this series.  I'd still appreciate comments on the
various things I noted in the patches.

thanks,
Tom


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