Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

Any help would be much appreciated!

Thanks,

badPanda

share|improve this question

1 Answer 1

up vote 2 down vote accepted

you can create an alias with:

alias gdb='/usr/local/bin/gdb'

or add it to your path with

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

you can then run which gdb to see which version your session is looking at.

hope this helps

edit: also note that if you want these to be active for your next login, you will need to add them to your ~/.profile

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.