It's not a working answer for me, but these are the three lines that should have a significant effect on your debugging experience.
set solib-search-path /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib
So I use linaros compiler for ARM at work and part of the build process includes reference the sysroot-glibc-linaro directory for your standard libraries.
set sysroot ../build/_arm-linux-gnueabihf/root
Your build environment should generate a directory that is very very close to what the root directory is on your ARM remote. For example when I ll my root directory above I get the usual stuff you'd see like usr/ lib/ bin/ etc/...etc. That way when gdb looks locally for 1 to 1 matches, your directory structure lines up for that to be achieved.
set debug-file-directory ../arm-linux-gnueabihf/debug-syms
So if your binaries are also stripped of debug information and put somewhere else it should be as simple as using the command above. But I'm also having issues the same issues as you depending on which combination of commands I use.
(gdb) show sysroot
The current system root is "/home/user/ws3/code/mcdocker1604/build_IXM150_arm-linux-gnueabihf/root/".
(gdb) show solib-search-path
The search path for loading non-absolute shared library symbol files is /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib.
(gdb) show debug-file-directory
The directory where separate debug symbols are searched for is "/home/user/ws3/code/mcdocker1604/build_IXM150_arm-linux-gnueabihf/debug-syms".
(gdb) target remote 10.235.221.21
10.235.221.21: No such file or directory.
(gdb) target remote 10.235.221.21:123
Remote debugging using 10.235.221.21:123
No executable file now.
warning: Could not load vsyscall page because no executable was specified
0xb43f7916 in ?? ()
(gdb) set sysroot ""
Error reading attached process's symbol file.
: No such file or directory.
warning: Could not load shared library symbols for 14 libraries, e.g. /lib/libpal.so.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Reading symbols from /home/user/ws3/code/build_IXM150_arm-linux-gnueabihf/root/app/lib/libFW.so...
(No debugging symbols found in /home/user/ws3/code/build_IXM150_arm-linux-gnueabihf/root/app/lib/libFW.so)
Reading symbols from /home/user/ws3/code/build_IXM150_arm-linux-gnueabihf/root/app/lib/libMCSvcClient.so...
(No debugging symbols found in /home/user/ws3/code/build_IXM150_arm-linux-gnueabihf/root/app/lib/libMCSvcClient.so)
Reading symbols from /home/user/ws3/code/build_IXM150_arm-linux-gnueabihf/root/app/lib/libMCSvcServer.so...
(No debugging symbols found in /home/user/ws3/code/build_IXM150_arm-linux-gnueabihf/root/app/lib/libMCSvcServer.so)
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/libcrypt.so.1...
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/libpthread.so.0...
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/librt.so.1...
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/libstdc++.so.6...
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/libm.so.6...
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/libgcc_s.so.1...
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/libc.so.6...
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/libnsl.so.1...
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/libresolv.so.2...
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/ld-linux-armhf.so.3...
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/libdl.so.2...
Reading symbols from /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/lib/libnss_files.so.2...
Error reading attached process's symbol file.
: No such file or directory.
(gdb) set solib-search-path /usr/local/sysroot-glibc-linaro-2.25-2017.08-arm-linux-gnueabihf/
Error reading attached process's symbol file.
: No such file or directory.
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Error reading attached process's symbol file.
: No such file or directory.
The impression I'm getting is that you either set sysroot or you set the debug-file-directory, but never both. sysroot just seems to expect everything to be present locally and I'm thinking it works best if debugging symbols aren't stripped into seperate .debug files.
I'm just word vomiting all this because I know I have all the pieces of the puzzle but it's just not working, I too get the...
Reading /home/user/ws3/code/mcdocker1604/build_IXM150_arm-linux-gnueabihf/debug-syms/lib//libunwind-arm.so.8.0.1.debug from remote target...
Reading target:/home/user/ws3/code/mcdocker1604/build_IXM150_arm-linux-gnueabihf/debug-syms/lib//libunwind-arm.so.8.0.1.debug from remote target...
(No debugging symbols found in target:/lib/libunwind-arm.so.8)
Messages, but for me you can see I'm getting an extra / on my path, I just don't know if it's expecting something else in between the //