1. 程式人生 > 實用技巧 >centos7 安裝debuginfo除錯glibc原始碼

centos7 安裝debuginfo除錯glibc原始碼

一、背景

在除錯一個問題時,發現問題因為memcpy拷貝資料時將資料寫壞,因此想除錯memcpy 看看是如何造成的,因此需要除錯資訊

二、環境

centos7 x86_64

in7.png

三、安裝步驟

1.檢視是否已經安裝過

in2.png

2. 使用系統自帶的一個工具進行安裝,

$sudodebuginfo-installglibc-devel.x86_64

in3.pngin4.pngin5.png

3.將安裝glibc-debuginfo和glibc-debuginfo-common 兩個包

in8.png

四、驗證

in10.png

in9.png

已經能正確進入memcpy函式內部

轉載於:https://blog.51cto.com/happytree007/2148988