<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi all,<br><br>I have been searching for a solution for my problem but unfortunately I didn't find a solution.<br><br>Problem:<br>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>.<br>I am a gentoo user so I am aware that -O exists.<br>So I went searching in KDevelop on how to configure this.<br><br>I changed some flags in the "Open Options", "Advanced settings" to use -O0.<br>
CMAKE_CXX_FLAGS<br>
CMAKE_CXX_FLAGS_DEBUG<br>
CMAKE_C_FLAGS<br>
CMAKE_C_FLAGS_DEBUG<br>...<br><br>And on the kdevelop forum I found a thread which mentioned using -g3 as well.<br>I did this, cleaned and recompiled the program. But still I have the same result.<br><br>I really have no clue anymore what I am doing wrong.<br>Anyone has an idea about this?<br><br>I use:<br>
<style type="text/css">p, li { white-space: pre-wrap; }</style>
<p style="margin: 0px; text-indent: 0px;"><span style="font-weight: 600;">Version 4.0.2 (using KDevPlatform 1.0.2)</span><br>Using KDE Development Platform 4.4.5 (KDE 4.4.5)</p><br>Program I want to compile to debug is Krdc.<br><br>Thanks in advance for your help!<br>                                    </body>
</html>