Cmake flags for debugging don't seem to be useful in valgrind? -
ok, have qt application i'm attempting debug; upon running valgrind on , redirecting output file, see many 'definitely lost' blocks this, make me sad:
==24357== 24 bytes in 1 blocks lost in loss record 150 of 508 ==24357== @ 0x4c2c56f: malloc (vg_replace_malloc.c:267) ==24357== 0x76ed3ca: fcpatterncreate (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4) ==24357== 0x76eb3cd: fcfontrenderprepare (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4) ==24357== 0x76eb66c: fcfontmatch (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4) ==24357== 0x57163d7: qfontdatabase::load(qfontprivate const*, int) (in /usr/lib/x86_64-linux-gnu/libqtgui.so.4.8.1) ==24357== 0x56f3586: qfontprivate::engineforscript(int) const (in /usr/lib/x86_64-linux-gnu/libqtgui.so.4.8.1) ==24357== 0x5728482: ??? (in /usr/lib/x86_64-linux-gnu/libqtgui.so.4.8.1) ==24357== 0x573b73d: qtextline::layout_helper(int) (in /usr/lib/x86_64-linux-gnu/libqtgui.so.4.8.1) ==24357== 0x573d5a4: qtextlayout::endlayout() (in /usr/lib/x86_64-linux-gnu/libqtgui.so.4.8.1) ==24357== 0x58f33ce: qlinecontrol::updatedisplaytext(bool) (in /usr/lib/x86_64-linux-gnu/libqtgui.so.4.8.1) ==24357== 0x58f36c6: qlinecontrol::init(qstring const&) (in /usr/lib/x86_64-linux-gnu/libqtgui.so.4.8.1) ==24357== 0x58ec720: ??? (in /usr/lib/x86_64-linux-gnu/libqtgui.so.4.8.1)
i'm not valgrind, far can tell, trace doesn't come source files, right? in fact, in full valgrind report (with -v switch) source files appear, except in main() declare qapplication.
then can assume i'm not compiling project cmake correctly? that's problem, because valgrind report doesn't seem helpful me right now..
now then, in cmakelists.txt, i'm (attempting) compile project debug flags so:
set(cmake_cxx_flags_debug "-g3 -ggdb -o0")
is proper way of doing this?
am doing wrong here?
thanks, , sorry such long question! :/
the usual procedure set cmake_build_type
variable debug
, release
, or etc. during configuration stage. can achieved using -d
flag command-line cmake
tool, or modifying appropriate field in gui.
if wish pass flags compiler, set cmake_cxx_flags
same way set cmake_build_type
.
as see, doesn't invovles modifying of cmakelists.txt
files, cmakecache.txt
in build dir.
Comments
Post a Comment