安装/卸载GDB
卸載原有GDB
1. 查詢 gdb是否安裝
[root@test01~]# rpm -qa |grep gdb
gdb-7.0.1-37.el5_7.1
gdbm-1.8.0-26.2.1
2. 刪除包
rpm-e --nodeps gdb-7.0.1-37.el5_7.1
注:
rpm -qa 后面要跟上包的名字才能搜索到
比如,rpm-qa http 搜不到,是因為包的名字叫做 httpd
rpm-qa | grep 是把搜索到的全部包的名字交給 grep 去過濾,只要包含那個字符串就會被顯示出來
安裝新版本GDB
1.獲獲取gdb-7.2.tar.gz版本安裝包?
如果為gdb-7.2.tar.gz形式的則用?
[root@localhost]# tar?–xvzf?gdb-7.2.tar.gz?
2. ?安裝執行步驟?
基本上所有的源碼包都是三步,configure,make,make?install。?進入gdb解壓后的目錄,按順序執行以下命令:?
[root@test01gdb-7.2]#./configure?
[root@test01gdb-7.2]#make?
[root@test01gdb-7.2]#make?instal
[root@test01gdb-7.2]# cp gdb/gdb /usr/bin
查看gdb版本
[root@test01 gdb-7.2]# gdb
GNU gdb (GDB) 7.2
Copyright (C) 2010 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".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
總結
- 上一篇: VisualGDB for Linux
- 下一篇: Unable to create '/m