gdb <value optimized out>

G VM drums_gvm at hotmail.com
Sat Dec 11 15:59:27 GMT 2010


Hi all,

I have been searching for a solution for my problem but unfortunately I didn't find a solution.

Problem:
When I start my compiled program with gdb and want to print the value of an integer (probably other data types as well) I get the message <value optimized out>.
I am a gentoo user so I am aware that -O exists.
So I went searching in KDevelop on how to configure this.

I changed some flags in the "Open Options", "Advanced settings" to use -O0.

CMAKE_CXX_FLAGS

CMAKE_CXX_FLAGS_DEBUG

CMAKE_C_FLAGS

CMAKE_C_FLAGS_DEBUG
...

And on the kdevelop forum I found a thread which mentioned using -g3 as well.
I did this, cleaned and recompiled the program. But still I have the same result.

I really have no clue anymore what I am doing wrong.
Anyone has an idea about this?

I use:


Version 4.0.2 (using KDevPlatform 1.0.2)
Using KDE Development Platform 4.4.5 (KDE 4.4.5)
Program I want to compile to debug is Krdc.

Thanks in advance for your help!
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20101211/e57744b2/attachment.html>


More information about the KDevelop mailing list