This is wrt Ubuntu setup.
In short, if I use command "objcopy --add-gnu-debuglink=/mntsymbols/binsymbol/prog.debug prog" it does not work and while doing gdb, symbols are not found. gdb gets symbols only if prog.debug is in same folder as prog. Things work after I do gdb> symbol-file /mntsymbols/binsymbol/prog.debug
/mntsymbols is mounted folder from remote machine. prog is stripped binary. prog.debug is debug symbol file for prog created using "objcopy --only-keep-debug".
I am trying to setup a gdb symbol server for a simple test program. sys1 is gdb symbol server. Will keep symbol files as sys1:/root/symboldir/testp1symbols/prog.debug sys1:/root/symboldir/testp1symbols/shared1.so.debug
Will mount sys1:/root/symboldir/ on sys2, and I should be able debug using gdb on sys2. how to achieve this using --add-gnu-debuglink or any other way.