There are tons and tons of post and blogs discussing this topic, but nothing seems to work...
From across the internet, here is the common consensus regarding the procedure required to install and run gdb
.
Install
gdb
brew install gdb
Homebrew "successfully" installs
gdb v8.1
Codesign
gdb
Codesign
gdb
by following the codesigning procedure (as detailed in a separate SO post).Update
~/.gdbinit
echo "set startup-with-shell off" >> ~/.gdbinit
After completing all the steps, when I attempt to debug a simple "hello world" program, I get the following startup error resulting from SIGTRAP
being throw.
(gdb) start
Temporary breakpoint 1 at 0x100000e66: file test.cpp, line 5.
Starting program: /Users/zfields/Documents/Development/test/a.out
[New Thread 0x1703 of process 67971]
[New Thread 0x1903 of process 67971]
During startup program terminated with signal SIGTRAP, Trace/breakpoint trap.
What am I missing?