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
Description: This is a digitally signed message part.
_______________________________________________ Kde-buildsystem mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-buildsystem
