打開/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 restricted
的deb-src
取消註解
找個適當的地方執行apt-get source glibc
在.gdbinit
中加入 set directories /path/to/glibc-source/glibc-2.27/malloc
done!