debug libs (Re: KDE/kdelibs/cmake/modules)
Ralf Habacker
ralf.habacker at freenet.de
Wed Mar 1 08:04:19 GMT 2006
Harri Porten schrieb:
> On Tue, 28 Feb 2006, Thiago Macieira wrote:
>
>
>> Qt does that on X11 too. This is especially nice for
>> the -debug-and-release mode.
>>
>
> Which can also be accomplished by doing seperate builds into different
> object directories.
>
>
>> If you want to build two separate libraries, you need two different names.
>>
>> *However*, does anyone want to build KDE *twice*? It already takes too
>> long to build KDE once (even on a 20-node cluster of Pentium IV 3 GHz)
>>
>> So I don't think we should build libkdecore_debug.so.4.2.0.
>>
>
> I advise against it as well. It hurts flexibility at runtime (as David
> pointed out) and makes 3rd party software development harder (build system
> has to be extended to check for two different namings). I can give first
> hand evidence that the change in Qt 4 was nothing but an annoyance for our
> company (an ISV).
>
In my kde-cygwin time I thought about another solution, but I'm not
sure, if this would work with all compilers.
Microsoft distributes debug symbol packages with their operating system
and several applications (search 'debug symbol' on google). I think that
this is a good idea, because i can compile a library/application once
and optional create a separate debug symbol file if i choose a debug mode.
In regular case i run the application without debug support. If I need
debug symbols i start a debugger, load the additional debug symbol
package(s) and start debugging.
The msvc debugger has complete build in support for this, it loads debug
symbols by default if they are located in specific pathes.
The gcc toolchain has initial but not complete support for this. gdb -
is able to load separate debug symbol packages by using the file
command, ld uses bfd which is able to separate debug informations into a
specific debug section (If i remember right, does ld store the debug
informations already in a separate section of the output file). The only
thing left is, that ld should have additional switches to write the
debug informations into a separate file instead of the linker output file.
For other compilers I don't know.
Ralf
More information about the kde-core-devel
mailing list