# Installing `gdb` in mac * install `gdb` binary using following scripts >> ```sh >> $ brew tap homebrew/dupes >> $ brew install gdb >> ``` * `/Applications/Utilities/Keychain Access.app` * Open menu `/Keychain Access/Certificate Assistant/Create a Certificate`... * Choose a name (`gdb-cert` in the example), set `Identity Type` to `Self Signed Root`, set `Certificate Type` to `Code Signing` and select the `Let me override defaults`. Click several times on `Continue` until you get to the `Specify a Location For The Certificate` screen, then set `Keychain` to `System`. * using the contextual menu for the certificate, select `Get Info`, open the `Trust` item, and set `Code Signing` to `Always Trust`. * You must quit Keychain Access application in order to use the certificate and restart `taskgated` service by killing the current running taskgated process (so before using gdb). >> ```sh >> ps -e | grep taskgated >> sudo kill -9 >> ``` * signing the binary using `codesign -s gdb-cert $(which gdb)` ## Reference * [Installing GDB on OS X Mavericks](http://ntraft.com/installing-gdb-on-os-x-mavericks/) * [official instruction](http://sourceware.org/gdb/wiki/BuildingOnDarwin)