在gdb中用原始碼debug glibc

打開/etc/apt/sources.list

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to  
# newer versions of the distribution.                         
deb http://debian.linux.org.tw/ubuntu/ bionic main restricted       
deb-src http://debian.linux.org.tw/ubuntu/ bionic main restricted

main restricteddeb-src取消註解
找個適當的地方執行apt-get source glibc
.gdbinit中加入 set directories /path/to/glibc-source/glibc-2.27/malloc
done!

Leave a Reply

Your email address will not be published. Required fields are marked *