This is the mail archive of the cygwin mailing list for the Cygwin 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: add -debuginfo packages


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?
> 
> 3) Is using /usr/lib/debug feasible?  I've only ever seen .dbg files placed in
> the same directory as the .exe/.dll.

gdb seems to know to look in /usr/lib/debug/<pathname> for the symbols for
<pathname>.

Attachment: 0001-Add-the-ability-to-preseve-debug-information-in-a-se.patch
Description: Text document

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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