It is a problem that appeared when I first updated to macOS Sierra yesterday.
GDB itself is running OK. However, somehow, it cannot run my program. When I type \'run
I've been having multiple issues with Sierra.
For starters my code that had worked on previous OSX versions has stopped working on this version. Nor would it compile.In addition GDB from brew is a complete mess. To add on that other 3rd party libraries got broken (e.g. libevent).
("Good job" Apple).
After "upgrading" to Sierra I suggest the following steps to get GDB working:
Install a newer gcc (Should take about 60 minutes - depending on your CPU etc...)
brew install gcc
Download the source code of GDB
Since gcc and g++ are aliased to the old gcc and g++ make sure to link it to the newer gcc and g++ e.g.:
export CC=`which gcc-6`
export CXX=`which gxx-6`
Configure & Compile gdb:
./configure
make CFLAGS=-Wno-error=deprecated-declarations CXXFLAGS=-Wno-error=deprecated-declarations
sudo make install