Re: [CMake] Save stripped debugging information

2013-05-15 Thread Ian Monroe
On Thu, Sep 22, 2011 at 12:25 AM, Lukas Anzinger l.anzin...@gmail.comwrote:

 Hi,

 I'm aware of the option CMAKE_BUILD_TYPE with which I can tell if I
 want to include debugging information or not.

 A very useful feature of the program objcopy is, to not strip
 debugging information from a file but to split it from it so that you
 can release a program without debugging information but can later
 debug it if you put the split debugging files in certain directories
 (more at
 http://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html).

 Is there a CMake way to do this?


It's a year and a half later. Did something come of this?

I just built Qt on Linux and with the right options it gives .debug files.
That's really nice. :)
Right now I have something working in my project where it builds with debug
info, extracts the debug info (I'm using Google Breakpad) and then strip
the binary. But a ReleaseWithSeperateDebugInfo option would be the ideal.
Mostly for peace of mind since I'm not a big fan of my stripping hack. ;)

Ian
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Save stripped debugging information

2011-09-22 Thread Rolf Eike Beer
 Hi,

 I'm aware of the option CMAKE_BUILD_TYPE with which I can tell if I
 want to include debugging information or not.

 A very useful feature of the program objcopy is, to not strip
 debugging information from a file but to split it from it so that you
 can release a program without debugging information but can later
 debug it if you put the split debugging files in certain directories
 (more at
 http://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html).

 Is there a CMake way to do this?

Sadly not. This is also annoying for e.g. MSVC builds where the debug
infos are stored in an extra file (.pdb) anyway, but you have no good way
to know the current location of the pdb file to install it.

I would like to see this as a fourth option to INSTALL(TARGETS):

INSTALL(TARGETS myexe mylib DEBUG_SYMBOLS /foo)

This could just copy the pdb file on MSVC builds and do the objcopy magic
in Un*x builds.

Eike
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Save stripped debugging information

2011-09-22 Thread Pawel Sikora
On Thursday 22 of September 2011 09:37:36 Rolf Eike Beer wrote:
  Hi,
 
  I'm aware of the option CMAKE_BUILD_TYPE with which I can tell if I
  want to include debugging information or not.
 
  A very useful feature of the program objcopy is, to not strip
  debugging information from a file but to split it from it so that you
  can release a program without debugging information but can later
  debug it if you put the split debugging files in certain directories
  (more at
  http://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html).
 
  Is there a CMake way to do this?
 
 Sadly not. This is also annoying for e.g. MSVC builds where the debug
 infos are stored in an extra file (.pdb) anyway, but you have no good way
 to know the current location of the pdb file to install it.
 
 I would like to see this as a fourth option to INSTALL(TARGETS):
 
 INSTALL(TARGETS myexe mylib DEBUG_SYMBOLS /foo)
 
 This could just copy the pdb file on MSVC builds and do the objcopy magic
 in Un*x builds.

moreover, the visual can produce two .pdb files:
- first, in build directory with full debug info.
- second, with stripped private symbols 
(http://msdn.microsoft.com/en-us/library/y87kw2fd.aspx)
  this stripped pdb is useful for release with product for automated crash 
stacktracing with dbghelp.dll.

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake