20160306 全程沒有f/qhtml
ZC:使用的虛擬機環境是:博客園VMwareSkill 的 「CentOS6.4_x86_120g__20160306.rar」python
須要調試器 gdb ,從「http://ftp.gnu.org/gnu/gdb/」下載了 「gdb-7.6.1.tar.bz2」sql
一、centos
在 對 gdb-7.6.1 執行make 的時候,會說缺乏 termcap庫,因而先安裝它:promise
yum install ncurses-develpython2.7
二、post
「測試
./configureui
make.net
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 。
三、安裝 Python
參考網址:http://www.cnblogs.com/dudu/p/4294238.html
3.一、安裝 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.二、下載、解壓(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.一、將 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.二、檢查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"能刪掉嗎?如今是沒有刪掉它,待之後測試吧...
四、編譯安裝 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.一、
若是在 對"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 。
五、
如今 基本的 斷點單步是OK了。
可是尚未 關聯Qt的源碼。
100、