Centos6.6下compile gdb with python过程

1. $bash ,我的机器默认的shell时csh,无法使用export命令。

2.

1 bash-4.1$ pwd
2 /tmp/chao/gdb-python-show

3.下载gdb: wget http://mirrors.kernel.org/sourceware/gdb/releases/gdb-7.9.tar.gz 

  得到:

1 bash-4.1$ ls
2 gdb-7.9.tar.gz

4.解压: bash-4.1$ tar -zxvf gdb-7.9.tar.gz 

5.进入解压文件:

1 bash-4.1$ pwd
2 /tmp/chao/gdb-python-show/gdb-7.9

6.找到python可执行程序的位置:

1 bash-4.1$ which python
2 /export/opt/Anaconda-1.9/bin/python

7.设置环境变量: LDFLAGS :  export LDFLAGS="-Wl,-rpath,/export/opt/Anaconda-1.9/lib -L/export/opt/Anaconda-1.9/lib" , 其中 /export/opt/Anaconda-1.9/lib 表示的是python安装目录下的lib文件夹,若为Anaconda,则使用Anaconda/lib。

8. ./configure --prefix="/tmp/chao/gdb-python-show/gdb-7.9/gdb-python--with-python="/export/opt/Anaconda-1.9/bin/"  --prefix= 设置gdb的安装路径, --with-python= 设置python可执行程序所在的全路径。

9. make ,8个i7-4790的linux机器,共用时3分17秒。

10. make install ,make与make install后,最后都显示

1 make[1]: Nothing to be done for `install-target'.
2 make[1]: Leaving directory `/tmp/chao/gdb-python-show/gdb-7.9'

11.安装完成,可以正常使用。

bash-4.1$ ls
bfd          config.log     configure       COPYING.LIB     gdb         libdecnumber  lt~obsolete.m4  Makefile     missing     readline         symlink-tree
ChangeLog     config-ml.in   configure.ac  cpu         gdb-python  libiberty       ltoptions.m4    Makefile.def  mkdep         README             texinfo
compile       config.rpath   COPYING       depcomp     include     libtool.m4    ltsugar.m4       Makefile.in     mkinstalldirs     README-maintainer-mode  ylwrap
config          config.status  COPYING3       djunpack.bat  install-sh  ltgcc.m4       ltversion.m4    Makefile.tpl  move-if-change  serdep.tmp
config.guess  config.sub     COPYING3.LIB  etc         intl         ltmain.sh       MAINTAINERS       md5.sum     opcodes     sim
bash-4.1$ cd gdb-python/
bash-4.1$ ls
bin  include  lib  share
bash-4.1$ cd bin/
bash-4.1$ ls
gcore  gdb  gdbserver
bash-4.1$ ./g
gcore      gdb        gdbserver  
bash-4.1$ ./gdb
GNU gdb (GDB) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) 

12.在QtCreator中测试:

转载于:https://www.cnblogs.com/Need4Speak/p/5464850.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值