Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install gdb (debugger) in Mac OSX El Capitan?

Tags:

macos

gdb

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.

like image 530
Tauheed Khan Mohd Avatar asked Oct 16 '15 04:10

Tauheed Khan Mohd


People also ask

Can you install GDB on Mac?

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.

How do I set up GDB?

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 .

Where is GDB path Mac?

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).


1 Answers

Install Homebrew first :

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then run this : brew install gdb

like image 57
Sankalp Singha Avatar answered Nov 04 '22 09:11

Sankalp Singha