如何在使用Clion链接到静态库的应用程序中放置断点?

问题描述:

我想用Clion 2016.1.1调试链接到静态库的应用程序,但每当我在调试模式下运行目标时,执行不会在我定义的断点中中断。如何在使用Clion链接到静态库的应用程序中放置断点?

但是如果有一个SIGSEGV

它会打破这是我的CMakeLists.txt

# Header files 
set(HEADER_FILES include/game/Game.h) 

# Source files 
set(SOURCE_FILES src/game/Game.cpp) 

# gameengine library 
add_library(gameengine STATIC ${HEADER_FILES} ${SOURCE_FILES}) 

# gamesample executable 
add_executable(gamesample src/main.cpp) # I'd like to debug step 
target_link_libraries(gamesample gameengine) 

# tests 
include_directories(lib/googletest) 
enable_testing() 
add_executable(tests test/tests.cpp) 
target_link_libraries(tests gameengine) 
target_link_libraries(tests gtest gtest_main) 
add_test(NAME test COMMAND tests) 

我用与克利翁捆绑GDB,

我切换到/ usr/bin中/ gdb和调试开始工作。