Debug buildtype broken

Thiago Macieira thiago at kde.org
Wed Sep 19 20:15:43 CEST 2007


Andreas Pakulat wrote:
>Hi,
>
>in kdelibs the CXX and CFLAGS for Debug builds are set to include -g -O2
>which breaks debug builds. This way debug builds are usable _only_ for
>getting backtraces, but not for actual debugging because this lets gcc
>optimize away some local variables and also makes stepping through code
>nearly impossible (each step may jump forth and back through the current
>function).
>
>The only workaround is using debugfull buildtype, which doesn't exist on
>win32, so I suspect its impossible to do debugging with MinGW.
>
>I suggest to change this to -g -O0 and leave -g -O2 to RelWithDebugInfo,
>which currently is nearly the same as Debug.

Some flags suggestions:
Release: -O2
RelWithDebugInfo: -g -O2
optimised-but-debuggable: -g -O2 -fno-inline -fno-schedule-insns -fno-reorder-blocks
Debug: -g -O0
Debugfull: -g3 -O0

RelWithDebugInfo is not suitable for debugging. It's enough to get 
backtraces, though.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20070919/df62baff/attachment.pgp 


More information about the Kde-buildsystem mailing list