Mac配置Eclipse CDT的Debug出现的问题
2018-03-03 21:55
375 查看
问题1:出现 Could not determine GDB version using command: gdb --version
原因:mac上没有安装gdb或者gdb位置配置有问题解决方法:1 安装gdb,
2 如果确定已经安装了gdb,需要配置Eclipse中Debuger的路径:项目右键-》Debug As-》Debug Configurations-》左侧C++ Application找到当前项目-》右侧标签页选择Debuger-》修改gdb的路径和.gdbinit文件路径
问题2:出现 Could not determine GDB version using command: gdb --version
Error in final launch sequence Failed to execute MI command: -exec-run Error message from debugger back end: Unable to find Mach task port for process-id 99177: (os/kern) failure (0x5). (please check gdb is codesigned - see taskgated(8)) Unable to find Mach task port for process-id 99177: (os/kern) failure (0x5). (please check gdb is codesigned - see taskgated(8))
原因:gdb没有签名
解决方法:1 具体步骤参考:https://segmentfault.com/q/1010000004136334
2 如果出现系统证书创建失败的问题参照:http://blog.csdn.net/lllkey/article/details/79423596
问题3:出现 Could not determine GDB version using command: gdb --version
Error in final launch sequence Failed to execute MI command: -exec-run Error message from debugger back end: During startup program terminated with signal ?, Unknown signal. During startup program terminated with signal ?, Unknown signal.
原因:mac osx某个版本之后会出现的问题,修改.gdbinit文件的配置可以解决
解决方法:1 参考:https://stackoverflow.com/questions/40052171/gdb-terminated-with-signal-unknown-signal
在home目录或者gdb的目录下创建文件:.gdbinit (我的gdb的路径为:/usr/local/Cellar/gdb/8.1/bin),只要之后再Eclipse中配置相应路径即可
echo "set startup-with-shell off" >> ~/.gdbinit重新开一个terminal 或者 在Eclipse下再debug即可
问题4:出现 Could not determine GDB version using command: gdb --version
Error in final launch sequence Failed to execute MI command: -exec-run Error message from debugger back end: During startup program terminated with signal SIGTRAP, Trace/breakpoint trap. During startup program terminated with signal SIGTRAP, Trace/breakpoint trap.
原因:gdb8.1版本的某些问题,需要降到某版本,我现在尝试gdb8.0.1是可以调试的
解决方法:1 参考:https://www.jianshu.com/p/b546a47b6b75
从这个文章来看gdb8.1并不适配现在的os,所以需要回退到gdb8.0.1
使用brew更换版本失败,由于其中需要用到
brew versions gdb
但是返回:
Error: Unknown command: versions
2 8.0.1下载地址:https://ftp.gnu.org/gnu/gdb/gdb-8.0.1.tar.xz
开始编译安装gdb:
解压:
tar -Jxvf /Users/lsq/Movies/thunder/gdb-8.0.1.tar.xz编译安装:
./configure --prefix=/usr/local make make -C gdb install签名gdb:
codesign -fs gdb_codesign $(which gdb)配置:
echo "set startup-with-shell off" >> ~/.gdbinit如果使用Eclipse调试:修改Debuger中gdb和.gdbinit的位置(参考问题1)
相关文章推荐
- mac系统下eclipse搭建android环境配置的几点小问题
- 在WIN7下配置eclipse中出现的问题
- Eclipse/CDT(Linux/Mac osx) 极速配置
- Mac 下Eclipse安装SVN出现的问题总结
- Eclipse CDT配置c++标准库目录(includes的问题)(Ubuntu 11.10)
- EclipseCDT+MinGW配置,出现gcc/g++:no input files的原因
- Mac 配置Android Studio 出现 can't find valid JVM问题
- Mac下配置Eclipse内存,解决Eclipse内存溢出问题
- Mac下Eclipse+ADT开发Android工程出现"Errors running builder"问题解决
- 关于mac版eclipse的配置问题
- Mac Eclipse 配置Tomcat 出现localhost:8080/ 404错误
- 有关Eclipse中配置Tomcat过程中出现了问题
- mac android eclipse 配置问题
- arm9,11开发过程中eclipse下载插件zylincdt出现的问题
- 个人的心血和经验——Eclipse + CDT + MinGW开发环境配置及问题解决
- launch failed.Binary not found(CDT---eclipse编写c++出现的问题)
- Mac os x 下配置Intellij IDEA + Tomcat 出现权限问题的解决办法
- 关于Mac Lion系统下Eclipse CDT 开发时遇到的“Launch failed binary not found”问题
- eclipse+CDT+cygwin调试时出现Source not found问题
- 解决“在eclipse中配置Tomcat时,出现Cannot create a server using the selected type的错误”的问题