gdb demo core.23358
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright © 2013 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-redhat-linux-gnu”.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/…
Reading symbols from /root/demo…(no debugging symbols found)…done.
[New LWP 23358]
Core was generated by `./demo’.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000400869 in bb(int, std::string) ()
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
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
然后glibc-2.17-324.el7_9.x86_64总是装不上
提示
已加载插件:fastestmirror, langpacks
enabling centos-sclo-rh-debuginfo
enabling centos-sclo-sclo-debuginfo
Loading mirror speeds from cached hostfile
- centos-sclo-rh: mirrors.ustc.edu.cn
- centos-sclo-sclo: mirrors.aliyun.com
Could not find a package for: glibc-2.17-324.el7_9
No debuginfo packages available to install
打开配置文件 vim /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-7 releases
# are merged into a single repo, split by BaseArch
#
# Note: packages in the debuginfo repo are currently not signed
#
[base-debuginfo]
name=CentOS-7 - Debuginfo
baseurl=http://debuginfo.centos.org/7/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-7
enabled=0
把enabled=0改成enabled=1即可
再执行
debuginfo-install glibc-2.17-326.el7_9.x86_64
即可