Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gdb debugging in Terminal OS X (10.8.5) with zsh

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.

like image 428
Robin des Bois Avatar asked Oct 26 '25 05:10

Robin des Bois


1 Answers

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
like image 182
dmckee --- ex-moderator kitten Avatar answered Oct 28 '25 21:10

dmckee --- ex-moderator kitten



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!