On 21/08/2009 00:40, Yaakov (Cygwin/X) wrote:
On 04/08/2009 13:58, Reini Urban wrote:
Rather than stripping our exe's and dll's I suggest to strip the debug
info into
seperate /usr/lib/debug/path/file.dbg and package them seperately in -debuginfo
packages such as with fedora.
FWIW, attached is the patch I've been using to do this, based on Reini's
patch, updated to address some of your concerns.
This can, as you suggested, strip the symbols to a location outside of ${D}
and create a single debuginfo package containing those symbols for each cygport.
I know that support for these packages in upset and setup has been rejected by
cgf, but it's still useful to me to keep the debuginfo for the packaged builds
of Xwin around.
1) Right now, cygport default CFLAGS="-O2 -pipe". Adding -g is easy enough,
but how will -O2 affect the debug info? (We really don't want to use -O0 for
distro packages, do we?)
The debug info can correctly reflect optimizations that have taken place (e.g.
variables that have been optimized out or source lines that have been become
interleaved)
2) I know that on Linux, -fomit-frame-pointer breaks debugging on x86 (but not
on amd64 or other arches). Some packages add this themselves for
optimization, and some outright need it for their asm code (ffmpeg comes to
mind). We then have a question of performance vs. debugging, so if you can
only have one, which takes priority?