Create a libheap initializer gdb command

This commit is contained in:
Michael Rodler 2017-01-12 10:52:35 +01:00
parent 63584b4957
commit 8a7c937af6

View file

@ -5,3 +5,22 @@ source ctf-tools-venv-activate
git clone --depth 1 https://github.com/cloudburst/libheap
pip install -e libheap
# make sure gdbinit exists
touch ~/.gdbinit
# check if init command exits
if ! grep "init-libheap" ~/.gdbinit; then
cat >> ~/.gdbinit <<EOF
####
# added by ctf-tools
define init-libheap
python from libheap import *
end
document init-pwndbg
Initializes the libheap gdb extension (https://github.com/cloudburst/libheap)
end
####
EOF
fi