I am trying to debug our code on remote server. Our code base is large and the bandwidth to the server from our office is quite slow. It is impossible to debug (each step takes from 10 seconds to few minutes).
The project is based on cpp, with CMake on clion IDE.
The basic debug flow works (I upload the libraries that compiled in debug to the remote server using rsync, and I can attach the debugger) but it takes around 30 minutes until all symbols are loaded from remote target.
For example:
Reading /usr/pgsql-12/lib/libpq.so.5 from remote target...
Reading /lib64/libgssapi_krb5.so.2 from remote target...
Reading /lib64/libkrb5.so.3 from remote target...
Reading /lib64/libcom_err.so.2 from remote target...
.. and so on for lots of libraries (this take almost 30 minutes )
I am trying the following using .gdbinit but with no luck:
- load debug symbols only for our own libraries (they are located on a folder , one copy on the remote and another locally)
- do not load debug symbols for system or std libraries
- use the local copy of the libraries and not the remote to save some more time and to improve the responsiveness of the debugger
I tried to sysroot and another commands in .gdbinit but i cannot make it work.
The libs on the host are in /home/ilia/debug/lib, and on the remote in /tmp/clion/debug