Due to some environmental constraints, many students may need to debug on the development machine, but due to the limitations of the development machine resources, the development machine directly on the local GDB environment configuration becomes a problem, this time in fact we can use the Gdbserver tool in GDB can be used to debug the remote development machine.
Gdbserver can walk the network, the serial port and other communication mechanisms, for the network support Ip:prot format operation. For example, your development machine is located in the IP is 192.168.3.11, your machine is 192.168.3.1, this time you first good GDB source code, and then into the Gdb_src/gdb/gdbserver directory./configure--host= Arm-linux-gnueabi,make,make Install, you use file to see if the current gdbserver is arm format, because eventually your gdbserver needs to run on the development machine, so it must be in arm format.
While your GDB is running on your machine, it is still in the x86 format, but his target is also shown to be set to arm, that is, under gdb_src/, configure--target=arm-linux-gnueabi,make,make Install, so you have completed the installation of GDB and Gdbserver.
After the development machine uploads the relevant gdbserver,./gdbserver 192.168.3.11:1234./test This opens the remote debugging interface for the development machine, which then enters the previously compiled GDB on the client and then enters the target remote 192.168.3.11:1234, that is, the completion of the development machine and your host docking, the next thing is the GDB debugging things