How to install gdb (debugger) in Mac OSX El Capitan ? I have tried installing gdb but failed couple of time.
I was following this URL : http://ntraft.com/installing-gdb-on-os-x-mavericks/ , MAC doesnot allow to install MacPorts.
Could anyone please help me in this regard.
As with GCC, the easiest way to install GDB is through Homebrew. In a Terminal window, run the command brew install gdb , and wait for it to complete. (As usual, it may ask for your password.) Now, we need to code-sign the GDB executable, so it will be allowed to control other processes, as necessary for a debugger.
The simplest way to configure and build GDB is to run configure from the `gdb- version-number ' source directory, which in this example is the `gdb-5.1. 1' directory. First switch to the `gdb- version-number ' source directory if you are not already in it; then run configure .
If you have installed gdb as explained before (using Homebrew), the path should be: /usr/local/Cellar/gdb/version/bin/gdb (replace version with the actual version of your gdb installation, e.g. /usr/local/Cellar/gdb/8.3/bin/gdb).
Install Homebrew first :
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then run this : brew install gdb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With