使用gdb调试core文件时,出现以下信息:
Missing separate debuginfos, use: debuginfo-install glibc-2.17-326.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64 libstdc+±4.8.5-44.el7.x86_64
- 修改/etc/yum.repos.d/CentOS-Debuginfo.repo文件中的enable为1,若没有该文件,
[base-debuginfo] name=CentOS-$releasever - DebugInfo baseurl=http://debuginfo.centos.org/$releasever/$basearch/ gpgcheck=0 enabled=0 protect=1 priority=1 - yum install glibc yum-utils
- debuginfo-install glibc-2.17-326.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64 libstdc+±4.8.5-44.el7.x86_64
如果第三步出现以下情况,大概率python版本过高导致的,更改debuginfo-install使用的python版本为2.7
[root@localhost build]# debuginfo-install glibc-2.17-326.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64 libstdc++-4.8.5-44.el7.x86_64
File "/usr/bin/debuginfo-install", line 58
except yum.Errors.YumBaseError, e:
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
修改debuginfo-install使用的python版本为2.*版本,如:
vi /usr/bin/debuginfo-install
修改第一行为
#!/usr/bin/python2.7
本文介绍了如何在使用gdb调试Core文件时遇到Missingseparateddebuginfos问题,包括修改yum配置、安装缺失的debuginfo以及处理因python版本过高导致的SyntaxError,最后提到将debuginfo-install脚本的python版本改为2.7以确保兼容性。
5761

被折叠的 条评论
为什么被折叠?



