This is the mail archive of the binutils@sources.redhat.com 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: RFC: strip --strip-nondebug


Michael Snyder writes:
 > Daniel Jacobowitz wrote:
 > > 
 > > On Thu, Jun 05, 2003 at 11:29:48AM -0700, Michael Snyder wrote:
 > > > Nick Clifton wrote:
 > > > >
 > > > > Hi Guys,
 > > > >
 > > > >   I am seeking comments and criticisms on the attached patch.  It adds
 > > > >   a new switch to strip:
 > > > >
 > > > >     --strip-nondebug
 > > > >
 > > > >   This can be used to create an output file which only contains the
 > > > >   debug information from an executable.  This would allow stripped
 > > > >   binaries to be shipped with separate debug info files, and provided
 > > > >   that the debugger supported it, they could still be debugged.
 > > > >
 > > > >   The patch is incomplete - it needs a ChangeLog entry as well as
 > > > >   modifications to NEWS and binutils.texi to document the new
 > > > >   functionality, but I will write all of these once/if the patch is
 > > > >   in acceptable state.
 > > >
 > > > How big a reduction in size would you expect, typically?
 > > > I'm a little ignorant, but what strippable info is in there
 > > > that gdb doesn't need?
 > > 
 > > The trick is that the output file doesn't contain the code or data
 > > segments.  Just the debug info.
 > 
 > I thought separate-debug-info was an orthogonal issue (mentioned
 > by Elena in her own reply).  My interpretation of Nick's patch
 > was that it would strip the binary of anything not needed by the
 > debugger, but leave the code and data.  I wanted to know what that
 > subset consists of, and how big it typically is.

The intent is to separate the debug info from the other stuff, and to
have gdb do:

gdb <executable-file>

and have this still work as expected (as if the debug info was in the
executable). If the debug info only file is not in special locations
that gdb looks in, the user can tell it where it is, and then
(re)issue a file command on the executable.

elena


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