Is it possible to store shell output into GDB variable in gdbinit?
Something like:
set solib-search-path=$(shell which gdb)+"..\project\lib"
If you have a new-ish version of GDB (I believe that means 7.x) with python support built, you could add a section like:
python
import subprocess
gdb.execute('set solib-search-path ' +
subprocess.check_output('which gdb',shell=True).rstrip() +
'../project/lib')
end
I can't claim it's not possible without using python, but it's the only way I know of to do it. [I also assumed you meant ../project/lib and not ..\project\lib, but that's an easy change...].