This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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 COMMITTED: Add --strip-debug-non-line


I'm not sure about .debug_frame.  If I understand correctly it's used
to generate stack traces in cases where the return addresses on the
stack are likely to be unreliable (usually optimized builds).  My goal
with this patch was to make smaller debug-able binaries, I hadn't
considered the case of optimized binaries with debugging information
included.  It probably makes sense to include it since it's easy to
get rid of the extra section if desired.

I'm not reducing the .debug_str section for two reasons.  One is that
gcc by default seems to make a lot of the strings directly inline in
.debug_info, so .debug_str isn't nearly as big as it could be.  The
second is speed.  RIght now the patch only has to do minimal parsing
of the debug info tree - removing the strings would entail a lot more
CPU effort.  I didn't think it was worth the tradeoff.

Caleb Howe

On Wed, May 28, 2008 at 2:43 PM, Daniel Jacobowitz <drow@false.org> wrote:
> On Wed, May 28, 2008 at 01:50:11PM -0700, Ian Lance Taylor wrote:
>> I've committed this patch go gold on behalf of Caleb Howe.  It adds a
>> new option: --strip-debug-non-line.  It strips debugging information
>> other than what is needed to map program counter values to line
>> numbers.  The result is an executable which can produce backtraces and
>> work with addr2line.
>
> Just two questions: are you sure you want to strip out .debug_frame,
> and does anything reduce .debug_str correspondingly to .debug_info?
>
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
>
>


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