macOS no longer includes gdb (the GNU debugger) by default, so you must install it yourself.
If you don't already have it, install homebrew, the package manager for macOS, using Terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Use homebrew to install gdb:
brew install gdb
You now need to codesign gdb to allow it the extra permissions it needs to run.