sudo pacman -S gdb
sudo pacman -S pwndbg
echo 'source /usr/share/pwndbg/gdbinit.py' >> ~/.gdbinit
If you are getting the following error "Cannot find Pwndbg virtualenv directory: /usr/share/pwndbg/.venv: please re-run setup.sh", do the following steps, otherwise ignore:
Creating the venv:
python -m venv /usr/share/pwndbg/.venv
Activating the venv:
source /usr/share/pwndbg/.venv/bin/activate
Install the missing packages:
pip install pwndbg pwnlib pyelftools psutil typing_extensions pwntools tabulate
Hey @niklaskeerl
I already fixed it. The fix works manually. The only problem is that pwndbg wants a virtual environment at the location:
/usr/share/pwndbg/.venv
I simply set up a virtual environment at that location manually. Then the environment still didn't have all the necessary packages, but running gdb over and over again tells you which packages the .venv needs. Every time you start gdb without all packages in /usr/share/pwndbg/.venv, gdb tries to launch pwndbg and outputs the next package that is missing. You can then use pip install inside the .venv to install the packages and restart gdb to tell you which package to install next. I had to manually install the following packages:
pwndbg
pwnlib
elftools
pyelftools
psutil
typing_extensions
pwntools
tabulate
From then on it worked.