Registered Member
|
Hi all,
I wanted to write a small improvement for krdc. So I downloaded the sources. I started a Debug project with KDevelop. I changed CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG, ... to include -O0 -g3. So optimization is disabled and have all debugging info. Issue 1: -------- Then I started krdc with gdb. When I did print aninteger I got <value optimized out>. So after a long time searching I found out using make -n that both -O0 -g3 and -g -O2 are on the c++ compilation line. I wonder how I can make that my flags get priority or how I can disable those other ones? Issue 2: -------- Another issue I am having is that I am able to step through mainwindow.cpp (I put a breakpoint there)... however when I want to step into a call to RdpView::start I can't step further anymore and the program just continues running. For both problems I have tried to figure this out for a long time but it is still not fixed. So I hope through this way someone can help me.(maybe a krdc developer?) Maybe the stepping into issue is specific to krdc? EDIT: I found out that I am actually using my compiled krdc binary, however, the loaded "plugins" gets taken from my installed krdc copy :s I want my krdc debug project plugins being used. Anyone an idea how I can do that? |
Administrator
|
From a different CMake project:
Which build mode is your CMake build tree using? This is visible in the output of make install. Example:
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
It's using Debugm, so my config looks correct. Do note that it is added, however there are 2 occurrences of -O and -g. |
Administrator
|
Please check the content of "CMakeCache.txt" to ensure that your options went into effect.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
They are listed (-ggdb -O0):
|
Administrator
|
Ok, don't know what could be the problem in this case then. Have you checked KRDC's CMakeLists.txt file to see if it is specifying any settings?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I also have a case open on the gdb mailing lists...
They pointed out the following: /usr/share/apps/cmake/modules/FindKDE4Internal.cmake If I look there for CMAKE_CXX_FLAGS_DEBUG: set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") this is probably what overwrites my configured flags. CMAKE_CXX_DEBUGFULL does not specify -O so if I use that it shouldn't be overwriting my flags. I will try it and let you know if this fixes it. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]