views:

9

answers:

1

My professor posted this online for a lab this week, but I missed the tutorial and didn't find how to do this. Does anyone know? It is just a simple command line thing, but I have been hunting around and can't seem to figure it out...

Hi everyone,

A new version of gdb (version 6.8) has been installed on the servers csb and csg (but not csh). This new version seems to avoid the problems people have been experiencing with the old version, such as labels not being recognized by the debugger.

The new version of gdb is installed in /usr/local/bin/gdb, while the old version (version 6.2.1) still remains in /opt/sfw/bin/gdb. You may want to create an alias or set your path to point to the new version in your Unix command shell. You can always check the version number of gdb by entering the following at the command line: gdb -version

I am ssh-ing on to the server, and have checked that my version is, in fact, the older one.

I know this is technically a 'superuser' question, but it does have to do with programming (debugger configuration...), and I have asked on superuser and no one responded. Hopefully, fellow programmers will have an answer :)

Any help would be much appreciated!

Thanks,

badPanda

+1  A: 

You can create an alias:

alias gdb /usr/local/bin/gdb

You don't change the "GDB search path", you change the executable search path.

export PATH=/usr/local/bin/:$PATH

You can both of these to your .bash_profile or .bashrc

I would probably go with the alias.

Edit: this is all assuming bash. It should work in tcsh too

teambob
Look at .tcshrc file in your home directory to perform these commands at every startup for tcsh
teambob