Getting .debug_frame Dwarf info without outputtings all the other debug info sections?
Ian Lance Taylor
iant@google.com
Fri Apr 6 00:20:00 GMT 2012
Matt Hoosier <matt.hoosier@gmail.com> writes:
> Is there any option (maybe one not mentioned as having this
> side-effect in the manpage?) that will cause GCC to emit the
> .debug_frame ELF section without piling on all the other Dwarf info
> sections implied by the '-g' command line option?
>
> I'm working on an application which is large enough to cause ld to
> slow down enormously if all debug info is generated. I'd at least like
> to have .debug_frame though, to allow debuggers to produce a
> backtrace.
>
> In spirit, I'm looking for something similar to '-funwind-tables', but
> which will generate the Dwarf info understood by a debugger (rather
> than the runtime exception-handling info that -funwind-tables
> targets).
If really all you want is a backtrace, the debugger should be able to do
that using the unwind tables.
I believe that the google branch in GCC's svn repository has a -gmlt
option that may do what you want.
Ian
More information about the Gcc-help
mailing list