Frage

For my studies I have to run a binary unix-program bomb with gdb. Some time ago I followed the steps on http://jakoblaegdsmand.com/blog/2013/04/how-to-get-an-awesome-looking-terminal-on-mac-os-x/ and made some changes to my terminal-setup. To runbomb with gdb I typed:

 -> bomb207  gdb bomb           
zsh: correct 'gdb' to 'gdv' [nyae]? n
zsh: command not found: gdb

When I type 'man gdb' zsh answers 'No manual entry for gdb' How can I change my terminal-setup to support gdb?

ps. I already installed the command line tools for os x with x code and I didn't had any problems until now...
bomb207 is the current directory and the location of bomb.

War es hilfreich?

Lösung

It appears that Apple (who have been switching from gcc to clang for some time) stopped including gdb in 10.8. Even in the CommandLine tools.

The clang debugger is lldb. It is similar in use to gdb, and I'm not finding it unduly difficult to switch. Aside from explaining to my finger that they shouldn't type gdb for the debugger anymore: my fingers don't like change.


Yes, you can still type gcc to compile things, but look:

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

Andere Tipps

on 10.15.6+ you can simply install gdb using homebrew

brew install gdb

You need to install GNU Debugger, or GDB. Try installing the full XCode package?

GDB works fine on my Mac, but then I've got full XCode installed.

Failing that, just for my peace of mind, type 'where gdb' and tell me what it prints out?

On my Mac it's in '/usr/bin/gdb', and on my linux boxes it's in '/usr/bin/gdb' and '/usr/bin/X11/gdb'.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top