顺藤摸瓜的解决GDB的DEBUG中出现的小问题

本文介绍了解决GDB调试过程中出现的分离调试信息缺失问题的方法。通过配置CentOS的debuginfo仓库并安装相应的glibc调试包,最终解决了GDB无法正确加载调试信息的问题。

1,在运行GDB的R指令时,报错。。。。

(gdb) r

Starting program: /root/tst

Breakpoint 1, main () at tst.c:17

17              long result=0;

Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.6.x86_64

2,按提示,运行debuginfo-install glibc-2.12-1.80.el6_3.6.x86_64时报错:

debuginfo-install glibc-2.12-1.80.el6_3.6.x86_64
-bash: debuginfo-install: command not found

3,网上搜索,找到有用的。

http://stackoverflow.com/questions/10352546/how-to-install-glibc-with-debugging-info-on-centos-5-5

http://hi.baidu.com/patrick_zhow/item/226b650d474fb43ef3eafcc8

 

For this to work, you need to have the debuginfo repository defined.  For CentOS 5, put the following in /etc/yum.repos.d/CentOS-Base-debuginfo.repo:

[base-debuginfo]
name=CentOS-$releasever -DebugInfo
baseurl=http://debuginfo.centos.org/$releasever/$basearch/
gpgcheck=0
enabled=0
protect=1
priority=1
~~~~~~~
debuginfo-install is part of the yum-utils package. 
If you don't know what package contains a command,
you can try something like yum install /usr/bin/debuginfo-install
and yum will find it for you (assuming that the package you want is in /usr/bin)
~~~~~~~~
4,问题解决

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值