Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GDB missing in OS X v10.9 (Mavericks)

Tags:

xcode

macos

gdb

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!

like image 768
l'L'l Avatar asked Oct 23 '13 23:10

l'L'l


People also ask

How do I get GDB on my 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 .


2 Answers

gdb has been replaced by lldb, and is no longer supported. gcc and llvm-gcc are also gone, replaced by clang.

like image 128
Catfish_Man Avatar answered Sep 30 '22 20:09

Catfish_Man


You can install it on Mavericks with Homebrew.

brew install homebrew/dupes/gdb 
like image 26
Jakub Głazik Avatar answered Sep 30 '22 20:09

Jakub Głazik