Gdbserver: Difference between revisions

Content deleted Content added
Momergil (talk | contribs)
m Alternatives: Text improvement; same information
Use the TCP port number that is registered with IANA for remote GDB (2159) rather than a placeholder (2345)
Line 11:
#* A 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 target using TCP ("23452159" is the [[List_of_TCP_and_UDP_port_numbers#Registered_ports|registered TCP port number for remote GDB]]):
<source lang="bash">
remote@~$ gdbserver :23452159 hello_world
Process hello_world created; pid = 2509
Listening on port 23452159
</source>
 
Line 21:
local@~$ gdb -q hello_world
Reading symbols from /home/user/hello_world...done.
(gdb) target remote 192.168.0.11:23452159
Remote debugging using 192.168.0.11:23452159
0x002f3850 in ?? () from /lib/ld-linux.so.2
(gdb) continue