Re: Help with -dbg packages for a library

2007-09-06 Thread Justin Pryzby
On Fri, Aug 31, 2007 at 10:57:55AM -0400, Justin Pryzby wrote:
 On Thu, Aug 30, 2007 at 09:29:45AM +0530, Kumar Appaiah wrote:
  Dear Debian Mentors,
  
  I have a specific question with regard to -dbg packages for
  libraries. My understanding of generating -dbg libraries is like this:
  
  1. We build the package with CFLAGS or CXXFLAGS = -g -O2 (for
  optimization).
  
  2. We call dh_strip while exluding the dbg package, to ensure that
  debugging sumbols are present there.
 I think the suggestion is for all libraries to use dh_strip
 --dbg-package or -k.
BTW this is in bug #420540.

 Justin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Help with -dbg packages for a library

2007-09-01 Thread Kumar Appaiah
On Fri, Aug 31, 2007 at 10:57:55AM -0400, Justin Pryzby wrote:
 So I think there should be no performance difference between running
 with the libraries compiled without -g, compiled with -g, compiled
 with -g and stripped, and compiled with -g and debug symbols/sections
 moved to a separate file.

Thanks for the detailed explanation.

 It would be neat if you could compare the ELF files using binutils
 tools.

I didn't do that, but ran some tests myself (it's a mathematical
library), and concluded that there's little to chose from between -g +
stripping and no debug+no stripping.

Thanks!

Kumar
-- 
Kumar Appaiah,
458, Jamuna Hostel,
Indian Institute of Technology Madras,
Chennai - 600 036


signature.asc
Description: Digital signature


Re: Help with -dbg packages for a library

2007-08-31 Thread Justin Pryzby
On Thu, Aug 30, 2007 at 09:29:45AM +0530, Kumar Appaiah wrote:
 Dear Debian Mentors,
 
 I have a specific question with regard to -dbg packages for
 libraries. My understanding of generating -dbg libraries is like this:
 
 1. We build the package with CFLAGS or CXXFLAGS = -g -O2 (for
 optimization).
 
 2. We call dh_strip while exluding the dbg package, to ensure that
 debugging sumbols are present there.
I think the suggestion is for all libraries to use dh_strip
--dbg-package or -k.

 Now, my situation is that upstream generates special pkg_debug
 packages by sending ./configure --enable-debug. While I achieve the
 desired result with the CFLAGS mentioned above, upstream fears that
 generating the library with debugging symbols first and then stripping
 them may result in a slightly reduced performance (it's a numerical
 computation library). While I am going to run some tests myself to
 verify this, I just wanted to ask the mentors here about their
 knowledge of this issue.
My *understanding* is that the debug information is in a separate ELF
section in the executable.  See the strip manpage for details, but
you can move the debug sections to a separate file, and distribute
such files as separate Debian packages.  So people who use the library
as just a dependency of some other package (and don't have problems so
don't need to debug it) just get the lib, and people who develop with
it get lib-dev, and also lib-dbg.

So I think there should be no performance difference between running
with the libraries compiled without -g, compiled with -g, compiled
with -g and stripped, and compiled with -g and debug symbols/sections
moved to a separate file.

It would be neat if you could compare the ELF files using binutils
tools.

Justin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Help with -dbg packages for a library

2007-08-29 Thread Kumar Appaiah
Dear Debian Mentors,

I have a specific question with regard to -dbg packages for
libraries. My understanding of generating -dbg libraries is like this:

1. We build the package with CFLAGS or CXXFLAGS = -g -O2 (for
optimization).

2. We call dh_strip while exluding the dbg package, to ensure that
debugging sumbols are present there.

Now, my situation is that upstream generates special pkg_debug
packages by sending ./configure --enable-debug. While I achieve the
desired result with the CFLAGS mentioned above, upstream fears that
generating the library with debugging symbols first and then stripping
them may result in a slightly reduced performance (it's a numerical
computation library). While I am going to run some tests myself to
verify this, I just wanted to ask the mentors here about their
knowledge of this issue.

Thanks!

Kumar
-- 
Kumar Appaiah,
458, Jamuna Hostel,
Indian Institute of Technology Madras,
Chennai - 600 036


signature.asc
Description: Digital signature