gdb <value optimized out>

G VM drums_gvm at hotmail.com
Mon Dec 13 08:51:08 GMT 2010


When I create the project IIRC I can't choose for debugfull. I used Debug.
Can I just grep for Debug and replace that with debugfull?

Sorry for my ignorance.

And thanks for your help!

> Date: Mon, 13 Dec 2010 09:12:39 +0100
> From: apaku at gmx.de
> To: kdevelop at barney.cs.uni-potsdam.de
> Subject: Re: gdb <value optimized out>
> 
> On 11.12.10 16:59:27, G VM wrote:
> > 
> > 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.
> 
> Then use "debugfull" as CMake Build Type, thats a special one provided
> by FindKDE4Internal.cmake and sets -O0 -g3 explicitly. The
> FindKDE4Internal.cmake file is also the culprit of setting -O2 -g in the
> cmake commandline. Unfortunately whoever wrote that piece implemented it
> in a way that it always overwrites whats set in the cache...
> 
> Andreas
> 
> -- 
> You will feel hungry again in another hour.
> 
> _______________________________________________
> kdevelop mailing list
> kdevelop at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20101213/d3c015ff/attachment-0001.html>


More information about the KDevelop mailing list