PDA

View Full Version : gdb in Terminal!


t300
Aug 13, 2004, 05:39 PM
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!

varmit
Aug 13, 2004, 06:00 PM
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!

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.

t300
Aug 13, 2004, 06:16 PM
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"...?

yellow
Aug 13, 2004, 06:22 PM
gdb does not come preinstalled in OSX.


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

That depends on which version of OSX you're running..

t300
Aug 13, 2004, 06:24 PM
I am running Panther..thanks for all your help...

What would be easiest? Developer tools or getting GDB?

MacFan26
Aug 13, 2004, 06:31 PM
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. :)

yellow
Aug 13, 2004, 06:33 PM
I am running Panther..thanks for all your help...

What would be easiest? Developer tools or getting GDB?

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 [ http://developer.apple.com ], go to Downloads, download XCode Tools 1.5, the latest version.. it's a VERY large download.

t300
Aug 13, 2004, 06:33 PM
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!

reh
Aug 13, 2004, 07:13 PM
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.
Eh? Executables can reside in ~/bin, /usr/local/bin, /usr/bin, /bin, /usr/local/sbin, /usr/sbin, /sbin, or any directory for that matter.

varmit
Aug 13, 2004, 10:11 PM
Eh? Executables can reside in ~/bin, /usr/local/bin, /usr/bin, /bin, /usr/local/sbin, /usr/sbin, /sbin, or any directory for that matter.

true, but I only felt like mentioning one.