Qt5.3.2_CentOS6.4_单步调试环境__20160306【勿删,繁琐】

20160306 全程没有f/q

ZC:使用的虚拟机环境是:博客园VMwareSkill 的 “CentOS6.4_x86_120g__20160306.rar

需要调试器 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 。

3、安装 Python

参考网址:http://www.cnblogs.com/dudu/p/4294238.html

  3.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

  3.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

     ”

  3.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"

  3.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"能删掉吗?现在是没有删掉它,待以后测试吧...

4、编译安装 gdb-7.6.1.tar.bz2(带 python)

参考网址:

  (1)、http://my.oschina.net/zenglingfan/blog/169564

  (2)、http://forum.qt.io/topic/41667/debugger-does-not-start-gdb-not-support-python-scripting

./configure --with-python

make

make install

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

4.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 。

5、

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

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

100、