CentOS环境下,gdb调试中出现:Missing separate debuginfos, use: debuginfo-install…..的问题

  • Post author:
  • Post category:其他

在linux gdb 调试程序是出现

(gdb) run fb.ini
Starting program: /home/lake/server/run/fb_game/fba1_game fb.ini
[Thread debugging using libthread_db enabled]
initalize log             [ok]
Detaching after fork from child process 19580.

Program exited normally.
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.166.el6_7.3.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64 libgcc-4.4.7-16.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64 libstdc++-4.4.7-16.el6.x86_64 openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) open tcp 127.0.0.1:2105    [ok]

1、  修改文件/etc/yum.repos.d/CentOS-Debuginfo.repo中的enabled参数,将其值修改为1,如:vi /etc/yum.repos.d/CentOS-Debuginfo.repo


没有这个文件就创建


# CentOS-Debug.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#

# All debug packages from all the various CentOS-5 releases
# are merged into a single repo, split by BaseArch
#
# Note: packages in the debuginfo repo are currently not signed
#

[debug]
name=CentOS-6 – Debuginfo
baseurl=http://debuginfo.centos.org/6/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-6
enabled=1

2、  使用命令:

 yum install nss-softokn-debuginfo –nogpgcheck

3、  使用命令:

debuginfo-install glibc

如果出现下面的问题:

-bash: debuginfo-install: command not found

则先安装yum-utils,使用命令:

yum install yum-utils

4、安装:libgcc-4.4.7-3.el6.x86_64,使用命令:

debuginfo-install libgcc-4.4.7-3.el6.x86_64


版权声明:本文为lake1314原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。