# Installing gdb

Mac users: I recommend you use a package installer like Homebrew in order to install gdb. After installing Homebrew, simply run:

brew install gdb


Homebrew should then complain that you need to codesign your gdb binary. To do this, follow the instructions on the gdb wiki. Make sure you follow the instructions exactly, or it won’t work! You’ll know if it doesn’t work if you try to debug a binary and you see this error message:

Starting program: my_cool_program
Unable to find Mach task port for process-id 28885: (os/kern) failure (0x5).

sudo apt install gdb