Gdbserver: Difference between revisions

Content deleted Content added
Accessory (talk | contribs)
Line 6:
== How it works ==
# <code>gdbserver</code> is launched on the target system, with the arguments:
#* Either a device name (to use a serial line) or a TCP hostname and portnumber, and
#* The path and filename of the executable to be debugged, and
#* A port number (TCP or UDP).
#:It then listenswaits passively for connectionsthe onhost thegdb to communicate with portit.
# <code>gdb</code> is run on the host, with the arguments:
#* The path and filename of the executable (and any sources) on the host, and
#* TheA device name (for a serial line) or the IP address and port number needed for connection to the target system.
 
Example for debugging a program called <code>hello_world</code> on a remote host using TCP ("2345" is the TCP port number):
<pre>
remote$ gdbserver :2345 hello_world