June 2017
Intermediate to advanced
478 pages
13h 14m
English
The connection between GDB and gdbserver can be through a network or serial interface. In the case of a network connection, you launch gdbserver with the TCP port number to listen on and, optionally, an IP address to accept connections from. In most cases, you don't care which IP address is going to connect, so you can just provide the port number. In this example, gdbserver waits for a connection on port 10000 from any host:
# gdbserver :10000 ./hello-worldProcess hello-world created; pid = 103Listening on port 10000
Next, start the copy of GDB from your toolchain, pointing it at an unstripped copy of the program so that GDB can load the symbol table:
$ arm-poky-linux-gnueabi-gdb hello-world
In GDB, use the ...
Read now
Unlock full access