CentOS 6.4和Eclipse Juno CDT(4.2.2)的bug
环境:
$ lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.4 (Final)
Release: 6.4
Codename: Final
$ rpm -qa | grep -i gdb
gdb-7.2-60.el6.x86_64
gdbm-1.8.0-36.el6.x86_64
eggdbus-0.6-3.el6.x86_64
CentOS 6.4下使用Eclipse Juno CDT(4.2.2)的项目在编译点调试后会弹出如下错误:
其中Details内容为:
Error in final launch sequence
Failed to execute MI command:
maintenance set python print-stack off
Error message from debugger back end:
Undefined maintenance set python command: "print-stack off". Try "help maintenance set python".
Undefined maintenance set python command: "print-stack off". Try "help maintenance set python".
后来经过google,大致是因为CentOS 6.4的gdb有升级,新版的gdb内删掉了一下命令,而Eclipse Juno CDT又刚好使用了这些命令。
http://www.eclipse.org/forums/index.php/m/1019746/
解决办法:
降级gdb,降为CentOS 6.3使用的版本
# yum downgrade http://mirrors.163.com/centos/6.3/os/x86_64/Packages/gdb-7.2-56.el6.x86_64.rpm