Qt Creator for non-Qt project using cmake



  • Hi,

    I have a non-Qt project and I use cmake. I can remote debug my app using gdb, but no variables are shown in the Expression Evaluator. I only get "<no such value>" for all variables. How to setup cmake profile to correctly shown the values of variables in debugging mode?

    My current cmake file:

    cmake_policy(SET CMP0015 NEW)
    set(CMAKE_SYSTEM_NAME Linux)
    set(CMAKE_SYSROOT /home/devel/board/sysroot)
    set(CMAKE_C_COMPILER /home/devel/gcc-4.8.2-eglibc-2.18/powerpc-603e-linux-gnu/bin/powerpc-603e-linux-gnu-gcc)
    set(CMAKE_CXX_COMPILER /home/devel/prj/ucxtools-3.3/target/gcc-4.8.2-eglibc-2.18/powerpc-603e-linux-gnu/bin/powerpc-603e-linux-gnu-g++)
    
    set(CMAKE_CXX_FLAGS_DEBUG "-g3 -O0 -Wall")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -O0 -Wall")
    
    set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
    set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
    set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
    set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
    
    include_directories(SYSTEM ${CMAKE_SYSROOT}/usr/include)
    link_directories(SYSTEM ${CMAKE_SYSROOT}/usr/lib)
    


  • I answer myself. The problem has been resolved by updating the GDB to the latest version.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.