5.23.2. Launch Gdbserver on the Target

Make sure Gdbserver is installed on the target. If it is not, install the package gdbserver, which needs the libthread-db1 package.

Here is an example, that when entered from the host, connects to the target and launches Gdbserver in order to "debug" a binary named helloworld:

     $ gdbserver localhost:2345 /usr/bin/helloworld
                

Gdbserver should now be listening on port 2345 for debugging commands coming from a remote GDB process that is running on the host computer. Communication between Gdbserver and the host GDB are done using TCP. To use other communication protocols, please refer to the Gdbserver documentation.