GDB missing in OS X v10.9 (Mavericks)

Solution 1:

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

Solution 2:

You can install it on Mavericks with Homebrew.

brew install homebrew/dupes/gdb

Solution 3:

This Homebrew command works to install GDB tools on Mavericks:

brew install https://raw.github.com/Homebrew/homebrew-dupes/master/gdb.rb

Solution 4:

Thanks I'L'I. I used your ./configure options and worked like a charm. Next step is to tell OS X that we allow GDB to debug. This is done by creating a certificate through the keychain, export it and then sudo codesing -s gdb-cert /route/to/gdb, give credential and we are done.

See GDB wiki detailed instructions

Solution 5:

I compiled GDB from the source in Maverics.

I altered the makefile (after ./configure) to suppress some errors that should have been warnings...(added the -Wno-string-plus-int)

Line 385:
CFLAGS = -g -O2 -Wno-string-plus-int

Line 388:
CXXFLAGS = -g -O2 -Wno-string-plus-int

Don't know if both are necessary.

But

As it turns out the standard version does not support debugging from .app files (as needed for Lazarus apps using the Carbon interface)

If you want to do it yourself follow this link: https://sourceware.org/gdb/wiki/BuildingOnDarwin