[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-buildsystem
Subject:    Re: Debug buildtype broken
From:       Thiago Macieira <thiago () kde ! org>
Date:       2007-09-19 18:15:43
Message-ID: 200709192015.43658.thiago () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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

["signature.asc" (application/pgp-signature)]

_______________________________________________
Kde-buildsystem mailing list
Kde-buildsystem@kde.org
https://mail.kde.org/mailman/listinfo/kde-buildsystem


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic