首页 > 其他 > 详细

Qt5.3.2_CentOS6.4_单步调试环境

时间:2016-03-06 19:12:20      阅读:331      评论:0      收藏:0      [点我收藏+]

20160306 全程没有f/q

 

需要调试器 gdb ,从“http://ftp.gnu.org/gnu/gdb/”下载了 “gdb-7.6.1.tar.bz2”

 

1、

在 对 gdb-7.6.1 执行make 的时候,会说缺少 termcap库,于是先安装它:

yum install ncurses-devel

 

2、

“

./configure

make

make install

”

使用这样的3条命令 编译出来的 gdb,不能被 Qt5.3.2 使用,Qt5.3.2调试的时候会说“The selected build of GDB does not support Python scripting. It cannot be used in Qt Creator.”

 

于是需要编译带 Python的 GDB

  2.1、编译带 Python的 GDB

    2.1.1、安装 Python前,需要装的一些东西:

      yum groupinstall "Development tools"

      yum install zlib-devel
      yum install bzip2-devel
      yum install openssl-devel
      yum install ncurses-devel
      yum install sqlite-devel

    2.1.2、下载、解压(ZC: 下面的这条解压命令 和 在窗口中右击文件解压有何区别?)、编译、安装 python

     “

      cd /home
      wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
      tar xf Python-2.7.9.tar.xz
      cd Python-2.7.9

      ./configure --prefix=/usr/local
      make
      make altinstall

     ”

    2.1.2.1、将 python命令 指向 "/home/Python-2.7.9"

      ln -s /usr/local/bin/python2.7 /usr/local/bin/python

      ZC: 貌似这一步不需要做了,∵ 查看了一下 "/usr/local/bin/python/python"已经指向了"/usr/local/bin/python/python2",而"/usr/local/bin/python/python2"页已经指向了"/usr/local/bin/python/python2.7"

    2.1.2.2、检查Python版本

      使用的命令为:

       “

        sh
        python -V

       ”

      执行的效果如下:

       “

        [root@centos Python-2.7.9]# sh
        sh-4.1# python -V
        Python 2.7.9
        sh-4.1# exit
        exit
        [root@centos Python-2.7.9]#

       ”

    ZC:现在 Python-2.7.9 安装完毕了,上面解压数来的 文件夹"/home/Python-2.7.9"能删掉吗?现在是没有删掉它,待以后测试吧...

 

 3、编译安装 gdb-7.6.1.tar.bz2

“

./configure --with-python
make
make install

”

ZC:gdb-7.6.1 安装好了,解压出来的 文件夹"gdb-7.6.1" 能删掉吗?现在是没有删掉它,待以后测试吧...

 

3.1、

如果在 对"gdb-7.6.1"执行make的时候,报错:
“
configure: loading cache ./config.cache
configure: error: `YACC‘ has changed since the previous run:
configure: former value: `/mnt/lfs/sources/binutils-2.22/missing bison -y‘
configure: current value: `bison -y‘
configure: error: in `/mnt/lfs/sources/binutils-build/binutils‘:
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean‘ and/or `rm ./config.cache‘ and start over
make[1]: *** [configure-binutils] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/binutils-build‘
make: *** [all] Error 2
lfs@UBUNTU-32bit:/mnt/lfs/sources/binutils-build$
”
看上去像是说需要安装 bison,然后执行命令"yum install bison" 控制台又显示信息说bison已经是最新版了...
后来知道了:看上去是 关于bison,实际是 要把目录删掉,重新 ./configure --with-python, make, make install 。

 

 

4、

现在 基本的 断点单步是OK了。

但是还没有 关联Qt的源码。

 

 

100、

 

Qt5.3.2_CentOS6.4_单步调试环境

原文:http://www.cnblogs.com/cppskill/p/5248106.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!