配置CLion使用gdb

因为CLion的debug界面非常好用,现在想用它来debug一个executable。项目环境比较特殊,project是一个library,编译会生成so文件。然后通过LD_PRELOAD=XX.so vetorAdd来执行测试的vectorAdd程序。但是debug时,主要是在这个library的源码。library的CMakeList.txt并不包含要测试的vectorAdd程序。 打开Run-->Edit Configurations-->侧边栏的+ -->Remote GDB Server,设置对应的参数如下: more ...