[RFC] cygport: split debuginfo packages

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Thu Jun 21 06:24:00 GMT 2012


Attached is a first draft of a patch to support split debuginfo packages 
automatically in cygport.  I'm looking for comments and suggestions, 
particularly on the following:

1) I propose adding a Debug category for all -debuginfo packages.

2) This places the debuginfo from e.g. /usr/bin/cygfoo-X.dll into 
/usr/lib/debug/usr/bin/cygfoo-X.dbg.  Unfortunately, when gdb finds 
library dependencies, they show up as e.g. 
/cygdrive/c/cygwin/bin/cygfoo-X.dll instead of as in /usr/bin, causing 
gdb to not find the debug file.  There are at least three solutions to this:

a. Fix (cygwin or) gdb to use /usr paths over /cygdrive/c/cygwin paths;
b. Move debug files to a .debug subdirectory (e.g. 
/usr/bin/.debug/cygfoo-X.dbg);
c. Move debug files alongside binaries (e.g. /usr/bin/cygfoo-X.dbg).

3) Sources referenced by the .dbg files are placed under 
/usr/src/debug/${PF}, as indicated by the -fdebug-prefix-map flags. 
Unfortunately, this breaks in-tree debugging (e.g. a noinst test or 
sample application).  AFAICS, binutils doesn't support changing the 
debug-prefix-map after the fact.  Does anyone have any suggestions on 
how to handle this?

4) The resulting binaries are somewhat larger, having only been 
--strip-debug'ed; what more is lost by --strip-unneeded or --strip-all 
to justify the larger binaries?

TIA,


Yaakov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debuginfo.patch
Type: application/x-itunes-itlp
Size: 6380 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20120621/2cb7374f/attachment.bin>


More information about the Cygwin-apps mailing list