<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
I got a step further.<br>It seems that both -g3 -O0 and -g -O2 are in the c++ compilation lines (make -n).<br>So the second take priority over the first.<br><br>However I still can't understand were those -g and -O2 are configured.<br>The CMAKE_CXX_FLAGS_DEBUG and CMAKE_CXX_FLAGS don't have these.<br><br>If I do a grep for -O2 and remove those, and then do make all works as it should.<br><br>touch rdp/rdpview.cpp<br>cd build<br>make -p | grep rdpview<br><br>   1.<br>      rdp/CMakeFiles/krdc_rdpplugin.dir/rdpview.o: ../rdp/rdpview.cpp ../core/hostpreferences.h ../core/remoteview.h ../rdp/rdphostpreferences.h ../rdp/rdpview.cpp ../rdp/rdpview.h /usr/include/KDE/../kdialog.h /usr/include/KDE/../kinputdialog.h /usr/include/KDE/../kmessagebox.h /usr/include/KDE/../kpassworddialog.h /usr/include/KDE/../kshell.h /usr/include/KDE/../kurl.h /usr/include/KDE/KDialog /usr/include/KDE/KInputDialog /usr/include/KDE/KMessageBox /usr/include/KDE/KPasswordDialog /usr/include/KDE/KShell /usr/include/KDE/KUrl /usr/include/KDE/KWallet/../../kwallet.h /usr/include/KDE/KWallet/Wallet /usr/include/qt4/Gentoo/gentoo-qconfig.h /usr/include/qt4/Qt3Support/q3cstring.h /usr/include/qt4/Qt3Support/q3valuelist.h /usr/include/qt4/QtCore/QEvent /usr/include/qt4/QtCore/QFlags /usr/include/qt4/QtCore/QMap /usr/include/qt4/QtCore/QObject /usr/include/qt4/QtCore/QPoint /usr/include/qt4/QtCore/QPointF /usr/include/qt4/QtCore/QProcess /usr/include/qt4/QtCore/QSize /usr/include/qt4/QtCore/QStringList /usr/include/qt4/QtCore/QUrl /usr/include/qt4/QtCore/QVariant /usr/include/qt4/QtCore/qabstractitemmodel.h /usr/include/qt4/QtCore/qalgorithms.h /usr/include/qt4/QtCore/qatomic.h /usr/include/qt4/QtCore/qatomic_alpha.h /usr/include/qt4/QtCore/qatomic_arch.h /usr/include/qt4/QtCore/qatomic_arm.h /usr/include/qt4/QtCore/qatomic_armv6.h /usr/include/qt4/QtCore/qatomic_avr32.h /usr/include/qt4/QtCore/qatomic_bfin.h /usr/include/qt4/QtCore/qatomic_bootstrap.h /usr/include/qt4/QtCore/qatomic_generic.h /usr/include/qt4/QtCore/qatomic_i386.h /usr/include/qt4/QtCore/qatomic_ia64.h /usr/include/qt4/QtCore/qatomic_macosx.h /usr/include/qt4/QtCore/qatomic_mips.h /usr/include/qt4/QtCore/qatomic_parisc.h /usr/include/qt4/QtCore/qatomic_powerpc.h /usr/include/qt4/QtCore/qatomic_s390.h /usr/include/qt4/QtCore/qatomic_sh.h /usr/include/qt4/QtCore/qatomic_sh4a.h /usr/include/qt4/QtCore/qatomic_sparc.h /usr/include/qt4/QtCore/qatomic_symbian.h /usr/include/qt4/QtCore/qatomic_vxworks.h /usr/include/qt4/QtCore/qatomic_x86_64.h /usr/include/qt4/QtCore/qbasicatomic.h /usr/include/qt4/QtCore/qbuffer.h /usr/include/qt4/QtCore/qbytearray.h /usr/include/qt4/QtCore/qchar.h /usr/include/qt4/QtCore/qconfig.h /usr/include/qt4/QtCore/qcoreapplication.h /usr/include/qt4/QtCore/qcoreevent.h /usr/include/qt4/QtCore/qdatastream.h /usr/include/qt4/QtCore/qeventloop.h /usr/include/qt4/QtCore/qfeatures.h /usr/include/qt4/QtCore/qglobal.h /usr/include/qt4/QtCore/qhash.h /usr/include/qt4/QtCore/qiodevice.h /usr/include/qt4/QtCore/qiterator.h /usr/include/qt4/QtCore/qline.h /usr/include/qt4/QtCore/qlinkedlist.h /usr/include/qt4/QtCore/qlist.h /usr/include/qt4/QtCore/qlocale.h /usr/include/qt4/QtCore/qmap.h /usr/include/qt4/QtCore/qmargins.h /usr/include/qt4/QtCore/qmetatype.h /usr/include/qt4/QtCore/qmimedata.h /usr/include/qt4/QtCore/qnamespace.h /usr/include/qt4/QtCore/qobject.h /usr/include/qt4/QtCore/qobjectdefs.h /usr/include/qt4/QtCore/qpair.h /usr/include/qt4/QtCore/qpoint.h /usr/include/qt4/QtCore/qpointer.h /usr/include/qt4/QtCore/qprocess.h /usr/include/qt4/QtCore/qrect.h /usr/include/qt4/QtCore/qregexp.h /usr/include/qt4/QtCore/qscopedpointer.h /usr/include/qt4/QtCore/qset.h /usr/include/qt4/QtCore/qshareddata.h /usr/include/qt4/QtCore/qsharedpointer.h /usr/include/qt4/QtCore/qsharedpointer_impl.h /usr/include/qt4/QtCore/qsize.h /usr/include/qt4/QtCore/qstring.h /usr/include/qt4/QtCore/qstringbuilder.h /usr/include/qt4/QtCore/qstringlist.h /usr/include/qt4/QtCore/qstringmatcher.h /usr/include/qt4/QtCore/qurl.h /usr/include/qt4/QtCore/qvariant.h /usr/include/qt4/QtCore/qvector.h /usr/include/qt4/QtGui/QAction /usr/include/qt4/QtGui/QApplication /usr/include/qt4/QtGui/QButtonGroup /usr/include/qt4/QtGui/QCheckBox /usr/include/qt4/QtGui/QDialog /usr/include/qt4/QtGui/QFormLayout /usr/include/qt4/QtGui/QGroupBox /usr/include/qt4/QtGui/QHBoxLayout /usr/include/qt4/QtGui/QHeaderView /usr/include/qt4/QtGui/QLabel /usr/include/qt4/QtGui/QLayout /usr/include/qt4/QtGui/QMessageBox /usr/include/qt4/QtGui/QSpacerItem /usr/include/qt4/QtGui/QSpinBox /usr/include/qt4/QtGui/QVBoxLayout /usr/include/qt4/QtGui/QWidget /usr/include/qt4/QtGui/QX11EmbedContainer /usr/include/qt4/QtGui/qabstractbutton.h /usr/include/qt4/QtGui/qabstractitemdelegate.h /usr/include/qt4/QtGui/qabstractitemview.h /usr/include/qt4/QtGui/qabstractscrollarea.h /usr/include/qt4/QtGui/qabstractslider.h /usr/include/qt4/QtGui/qabstractspinbox.h /usr/include/qt4/QtGui/qaction.h /usr/include/qt4/QtGui/qactiongroup.h /usr/include/qt4/QtGui/qapplication.h /usr/include/qt4/QtGui/qboxlayout.h /usr/include/qt4/QtGui/qbrush.h /usr/include/qt4/QtGui/qbuttongroup.h /usr/include/qt4/QtGui/qcheckbox.h /usr/include/qt4/QtGui/qcolor.h /usr/include/qt4/QtGui/qcursor.h /usr/include/qt4/QtGui/qdesktopwidget.h /usr/include/qt4/QtGui/qdialog.h /usr/include/qt4/QtGui/qdrag.h /usr/include/qt4/QtGui/qevent.h /usr/include/qt4/QtGui/qfont.h /usr/include/qt4/QtGui/qfontinfo.h /usr/include/qt4/QtGui/qfontmetrics.h /usr/include/qt4/QtGui/qformlayout.h /usr/include/qt4/QtGui/qframe.h /usr/include/qt4/QtGui/qgridlayout.h /usr/include/qt4/QtGui/qgroupbox.h /usr/include/qt4/QtGui/qheaderview.h /usr/include/qt4/QtGui/qicon.h /usr/include/qt4/QtGui/qimage.h /usr/include/qt4/QtGui/qitemselectionmodel.h /usr/include/qt4/QtGui/qkeysequence.h /usr/include/qt4/QtGui/qlabel.h /usr/include/qt4/QtGui/qlayout.h /usr/include/qt4/QtGui/qlayoutitem.h /usr/include/qt4/QtGui/qmacdefines_mac.h /usr/include/qt4/QtGui/qmatrix.h /usr/include/qt4/QtGui/qmessagebox.h /usr/include/qt4/QtGui/qmime.h /usr/include/qt4/QtGui/qpaintdevice.h /usr/include/qt4/QtGui/qpainterpath.h /usr/include/qt4/QtGui/qpalette.h /usr/include/qt4/QtGui/qpixmap.h /usr/include/qt4/QtGui/qpolygon.h /usr/include/qt4/QtGui/qregion.h /usr/include/qt4/QtGui/qrgb.h /usr/include/qt4/QtGui/qrubberband.h /usr/include/qt4/QtGui/qsizepolicy.h /usr/include/qt4/QtGui/qslider.h /usr/include/qt4/QtGui/qspinbox.h /usr/include/qt4/QtGui/qstyle.h /usr/include/qt4/QtGui/qstyleoption.h /usr/include/qt4/QtGui/qtabbar.h /usr/include/qt4/QtGui/qtabwidget.h /usr/include/qt4/QtGui/qtransform.h /usr/include/qt4/QtGui/qtransportauth_qws.h /usr/include/qt4/QtGui/qvalidator.h /usr/include/qt4/QtGui/qwidget.h /usr/include/qt4/QtGui/qwindowdefs.h /usr/include/qt4/QtGui/qwindowdefs_win.h /usr/include/qt4/QtGui/qwmatrix.h /usr/include/qt4/QtGui/qx11embed_x11.h /usr/include/qt4/QtXml/QDomDocument /usr/include/qt4/QtXml/qdom.h core/settings.h rdp/../../rdp/rdpview.h rdp/rdpview.moc rdp/ui_rdppreferences.h rdp/CMakeFiles/krdc_rdpplugin.dir/flags.make<br>   2.<br>      #  Implicit rule search has not been done.<br>   3.<br>      #  Modification time never checked.<br>   4.<br>      #  File has not been updated.<br>   5.<br>      #  commands to execute (from `rdp/CMakeFiles/krdc_rdpplugin.dir/build.make', line 126):<br>   6.<br>              $(CMAKE_COMMAND) -E cmake_progress_report /home/xxx/kdenetwork-4.4.5/krdc/build/CMakeFiles $(CMAKE_PROGRESS_4)<br>   7.<br>              @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object rdp/CMakeFiles/krdc_rdpplugin.dir/rdpview.o"<br>   8.<br>              cd /home/xxx/kdenetwork-4.4.5/krdc/build/rdp && /usr/bin/c++   $(CXX_DEFINES) $(CXX_FLAGS) -o CMakeFiles/krdc_rdpplugin.dir/rdpview.o -c /home/xxx/kdenetwork-4.4.5/krdc/rdp/rdpview.cpp<br><br><br>Vi rdp/CMakeFiles/krdc_rdpplugin.dir/flags.make<br># CMAKE generated file: DO NOT EDIT!<br># Generated by "Unix Makefiles" Generator, CMake Version 2.8<br><br># compile CXX with /usr/bin/c++<br>CXX_FLAGS =  -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline -fPIC -I/home/xxx/kdenetwork-4.4.5/krdc/build/rdp -I/home/xxx/kdenetwork-4.4.5/krdc/rdp -I/home/xxx/kdenetwork-4.4.5/krdc -I/home/xxx/kdenetwork-4.4.5/krdc/build -I/home/xxx/kdenetwork-4.4.5/krdc/core -I/home/xxx/kdenetwork-4.4.5/krdc/build/core -I/usr/include/KDE -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtDBus -I/usr/include/qt4/QtAssistant -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4   -D_GNU_SOURCE -D_LARGEFILE64_SOURCE<br><br>CXX_DEFINES = -DMAKE_KRDC_RDPPLUGIN_LIB -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE_DEFAULT_DEBUG_AREA=5012<br><br>So here it is already set.<br><br>Hopefuly this helps finding the cause.<br><br><hr id="stopSpelling">From: drums_gvm@hotmail.com<br>To: kdevelop@kdevelop.org<br>Subject: gdb <value optimized out><br>Date: Sat, 11 Dec 2010 16:59:27 +0100<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>


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>
.ExternalClass p, .ExternalClass li
{white-space:pre-wrap;}
</style>
<p style="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>                                         
<br>_______________________________________________
kdevelop mailing list
kdevelop@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop                                        </body>
</html>