CentOS下gdb升级(解决No symbol "***" in current context问题)
2016-03-08 18:09
951 查看
gcc升级到了4.8.2,发现gdb调试看不到中间变量信息了,提示:No symbol "***" in current context。网上查资料怀疑是gdb版本问题。
gdb -v查看到我当前版本是7.2,于是打算升级gdb版本。
1、下载最新版gdb 7.10.1源码包
http://ftp.gnu.org/gnu/gdb/,
我下载的是7.10版本http://ftp.gnu.org/gnu/gdb/gdb-7.10.tar.gz,将源码包放在/usr/local目录
2. 解压缩gdb 7.10源码包
cd /usr/local
tar -zxvf gdb-7.10.tar.gz
3. 生成makefile,并编译
./configure
make
sudo make install
make install出了一些错误,网上找了好久,没找出原因,那就跳过去:
/usr/local/gdb-7.10/missing: line 81: makeinfo: command not found
WARNING: 'makeinfo' is missing on your system.
You should only need it if you modified a '.texi' file, or
any other file indirectly affecting the aspect of the manual.
You might want to install the Texinfo package:
<http://www.gnu.org/software/texinfo/>
The spurious makeinfo call might also be the consequence of
using a buggy 'make' (AIX, DU, IRIX), in which case you might
want to install GNU make:
<http://www.gnu.org/software/make/>
make[5]: *** [gdb.info] Error 127
make[5]: Leaving directory `/usr/local/gdb-7.10/gdb/doc'
make[4]: *** [subdir_do] Error 1
make[4]: Leaving directory `/usr/local/gdb-7.10/gdb'
make[3]: *** [install-only] Error 2
make[3]: Leaving directory `/usr/local/gdb-7.10/gdb'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/usr/local/gdb-7.10/gdb'
make[1]: *** [install-gdb] Error 2
make[1]: Leaving directory `/usr/local/gdb-7.10'
make: *** [install] Error 2
4. 将编译好的gdb拷贝到/usr/bin目录中
cp gdb/gdb /usr/bin/gdb
5. 查看安装是否成功。
gdb -v
显示:
GNU gdb (GDB) 7.10
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 -v查看到我当前版本是7.2,于是打算升级gdb版本。
1、下载最新版gdb 7.10.1源码包
http://ftp.gnu.org/gnu/gdb/,
我下载的是7.10版本http://ftp.gnu.org/gnu/gdb/gdb-7.10.tar.gz,将源码包放在/usr/local目录
2. 解压缩gdb 7.10源码包
cd /usr/local
tar -zxvf gdb-7.10.tar.gz
3. 生成makefile,并编译
./configure
make
sudo make install
make install出了一些错误,网上找了好久,没找出原因,那就跳过去:
/usr/local/gdb-7.10/missing: line 81: makeinfo: command not found
WARNING: 'makeinfo' is missing on your system.
You should only need it if you modified a '.texi' file, or
any other file indirectly affecting the aspect of the manual.
You might want to install the Texinfo package:
<http://www.gnu.org/software/texinfo/>
The spurious makeinfo call might also be the consequence of
using a buggy 'make' (AIX, DU, IRIX), in which case you might
want to install GNU make:
<http://www.gnu.org/software/make/>
make[5]: *** [gdb.info] Error 127
make[5]: Leaving directory `/usr/local/gdb-7.10/gdb/doc'
make[4]: *** [subdir_do] Error 1
make[4]: Leaving directory `/usr/local/gdb-7.10/gdb'
make[3]: *** [install-only] Error 2
make[3]: Leaving directory `/usr/local/gdb-7.10/gdb'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/usr/local/gdb-7.10/gdb'
make[1]: *** [install-gdb] Error 2
make[1]: Leaving directory `/usr/local/gdb-7.10'
make: *** [install] Error 2
4. 将编译好的gdb拷贝到/usr/bin目录中
cp gdb/gdb /usr/bin/gdb
5. 查看安装是否成功。
gdb -v
显示:
GNU gdb (GDB) 7.10
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".
安装成功!
相关文章推荐
- Linux socket 初步
- Linux Kernel 4.0 RC5 发布!
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Ubuntu Linux使用体验
- c语言实现hashmap(转载)
- Linux 信号signal处理机制
- linux下mysql添加用户
- Scientific Linux 5.5 图形安装教程
- Linux 下无损图片压缩小工具介绍