查看內核版本,查找對應的內核rpm文件
[root@localhost ~]#uname -rsp Linux 3.10.0-229.1.2.el7.x86_64 x86_64
去debuginfo.centos.org 下載相應的rpm包,本機內核是3.10.0-229.1.2.el7.x86_64 x86_64
下載:
- kernel-debuginfo-3.10.0-229.1.2.el7.x86_64.rpm 依賴下面的安裝,所以先安裝下面的
- kernel-debuginfo-common-x86_64-3.10.0-229.1.2.el7.x86_64.rpm 先安裝
安裝rpm順序:
rpm -ivh kernel-debuginfo-common-x86_64-3.10.0-229.1.2.el7.x86_64.rpm
rpm -ivh kernel-debuginfo-3.10.0-229.1.2.el7.x86_64.rpm
安裝完畢,就有命令 debuginfo-install 了
有的需要配置yum CentOS-Debuginfo.repo ,我這里沒有做更改。
使用debuginfo-install安裝各種軟件包的debug包,這樣就可以進行內核調試了。debug的rpm下載位置在:http://debuginfo.centos.org/6/x86_64/
下載完,安裝: sudo rpm -ivh mercurial-debuginfo-1.4-5.el6_9.x86_64.rpm
參考:
1、http://www.72zk.com/show/blog/20
2、https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/developer_guide/intro.debuginfo