I would have thought this question was already asked, but I couldn't find it. Bear with me if it was.
I am trying out modifications to an existing program in a debian installation.
The program, call it foo, when compiled creates some of it's own shared libraries. I would like to debug the program and step into one of the local shared libraries, call it libbar.so.
However since this is an existing program there is already a /usr/lib/libbar.so, which I do not want to overwrite.
So how do I get gdb to use the local libbar.so?