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
This works for me:
Unlink current gdb: brew unlink gdb
brew unlink gdb
Install gdb 8.0.1: brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/9ec9fb27a33698fc7636afce5c1c16787e9ce3f3/Formula/gdb.rb
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/9ec9fb27a33698fc7636afce5c1c16787e9ce3f3/Formula/gdb.rb
Optional: avoid upgrade gdb with brew pin gdb
brew pin gdb