I'm using CLion in order to connect to remote gdbserver
which is run on remote machine (via ssh port forwarding).
I't works quite well except one thing, it downloads all linked dependencies every time I connect to gdbserver
:
So, I could not find out is there any flag to pass in gdb remote
to cache such files.
To start remote debugging, run GDB on the host machine, and specify as an executable file the program that is running in the remote machine. This tells GDB how to find your program's symbols and the contents of its pure text. Start GDB on the host, and connect to the target (see section Connecting to a remote target).
A target is the execution environment occupied by your program. Often, GDB runs in the same host environment as your program; in that case, the debugging target is specified as a side effect when you use the file or core commands.
A target is typically a protocol for talking to debugging facilities. You use the argument type to specify the type or protocol of the target machine. Further parameters are interpreted by the target protocol, but typically include things like device names or host names to connect with, process numbers, and baud rates.
Yes, the remote serial protocol used to communicate between GDB and GDBServer absolutely should be backward compatible.
If your problem is not caching the libs but actually speeding up the GDB starting process you could set solib-absolute-prefix to a location on your host that contains all the shared libs. If you are using a nfs mounted environment for your target on your host. You could use the solib-absolute-prefix to set the path of shared libraries to your nfs host location so you don't retrieve them through the network every time you start the session.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With