I went to use GDB in OS X v10.9 (Mavericks), and it's not there. Where has it gone?
# /usr/lib/gdb -bash: /usr/bin/gdb: No such file or directory # gdb -bash: gdb: command not found
I also launched Xcode 5.0.1:
Preferences > Downloads
..and there's no longer command line tools available — ffs!
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 .
gdb
has been replaced by lldb
, and is no longer supported. gcc
and llvm-gcc
are also gone, replaced by clang
.
You can install it on Mavericks with Homebrew.
brew install homebrew/dupes/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