gdb in Terminal!

Discussion in 'General Mac Discussion' started by t300, Aug 13, 2004.

  1. macrumors 6502a


    Hello all...

    I am trying to follow a set of instructions from a friend for a program he made. I am in terminal and his instructions say "type gdb and press enter."
    I do that and all I get is : -bash: gdb: command not found

    Can someone please tell me how to continue on so I can get this done? Thank you!
  2. macrumors 68000


    It most likely means that a step before this one didn't work or you don't have a certain script or program installed. That program being "gdb"

    If you open terminal. Type "whoami" and hit enter, it will return your user name.

    Now lets change the directory to /usr/bin, "cd /usr/bin" and hit enter. Then get the list of files, or commands that are in this file "bin" for "users" to use type "ls". Now if gdb isn't in here, then its not a script or program that the user can run from terminal. You can see "whoami" in there. Somehow your friends program was suppost to install here, but it didn't. Might want to ask your friend, since we don't know what this program is or what it is suppost to do.
  3. macrumors 6502a


    I appreciate it..Here's what he says in the top..

    "you will need the GNU debugger, aka 'gdb'. It's a command line debugger, so you'll need to run the terminal at one point. If you don't have gdb, you probably need the Developer Tools installed. "

    Now where can I get this or "Developer Tools"...?
  4. Moderator


    Staff Member

    gdb does not come preinstalled in OSX.

    That depends on which version of OSX you're running..
  5. macrumors 6502a


    I am running Panther..thanks for all your help...

    What would be easiest? Developer tools or getting GDB?
  6. macrumors 65816


    I'm running panther as well, and I have the developer tools installed. Since gdb is part of developer tools, it's probably easier just to install the whole thing. I've you're going to be using gdb, you might find the rest of the developer tools useful too. :)
  7. Moderator


    Staff Member

    It's probably in your best interest to get the Developers Tools (called XCode Tools in Panther and beyond), in case you're attempting to compile things now or in the future. Beware, it's QUITE large. It could be one of 3 places:

    1) In an Installers directory in /Applications or /Applications/Installers. Beware, Developer's Tools (this is for Jaguar and pre-Jaguar) will not work with Panther.

    2) Your Panther CDs should have come with an XCode Tools CD if you upgraded to Panther, else it's on one of your DVDs that came with your computer. Possibly a Software Restore DVD?

    3) Sign up for free at Apple's Developer website [ ], go to Downloads, download XCode Tools 1.5, the latest version.. it's a VERY large download.
  8. macrumors 6502a


    Where can I get them?

    All I can see on Apple is a Developer's Tools section, with each program, like XCODE, Terminal, etc. So can someone provide me with a direct link to this "Developer's Tools" set? Thank you all. I love Macrumors.

    EDIT: Following post above for now. Thank you very much!
  9. reh
    macrumors 6502a

    Eh? Executables can reside in ~/bin, /usr/local/bin, /usr/bin, /bin, /usr/local/sbin, /usr/sbin, /sbin, or any directory for that matter.
  10. macrumors 68000


    true, but I only felt like mentioning one.

Share This Page