解决报错:cannot locate debugging information for file
内核需要三部分调试信息
检查/proc/sys/kernel/kptr_restrict
# cat /proc/sys/kernel/kptr_restrict
0查看包名
echo "kernel-debuginfo-common-x86_64-`uname -r`.rpm"
echo "kernel-debuginfo-`uname -r`.rpm"下载debuginfo
wget http://debuginfo.centos.org/7/x86_64/kernel-debuginfo-common-x86_64-`uname -r`.rpm
wget http://debuginfo.centos.org/7/x86_64/kernel-debuginfo-`uname -r`.rpm安装
yum install kernel-debuginfo-common-x86_64-3.10.0-693.2.2.el7.x86_64.rpm
yum install kernel-debuginfo-3.10.0-693.2.2.el7.x86_64.rpm重新编译内核,top-level Makefile增加:
CFLAGS_KERNEL := -g
CFLAGS := -gmake clean; make to create the vmlinux kernel file with debug information
uname -r后找对应版本
https://vault.centos.org/7.4.1708/os/Source/SPackages/