You can run GDB, the GNU Debugger, on your host system to debug programs running remotely on a target board or system. You can also run and debug programs using the GDB simulator.
While this section explains the alternatives for using GDB to run and debug application programs, explaining the use of the GDB command-line interface is beyond the scope of this document. Please refer to the GDB manual for further instructions.
GDB includes a simulator that allows you to debug ARM EABI applications without target hardware. To start and connect to the simulator from within GDB, use this command:
(gdb) target sim
The Sourcery G++ Debug Sprite is a program that runs on the host system to support hardware debugging devices. You can use the Debug Sprite to run and debug programs on a target board without an operating system, or to debug an operating system kernel. See Chapter 7, Sourcery G++ Debug Sprite for detailed information about the supported devices.
You can start the Sprite directly from within GDB:
(gdb) target remote | arm-none-eabi-sprite arguments
Refer to the section called “Sourcery G++ Debug Sprite Options” for a full description of the Sprite arguments.
From within GDB, you can connect to a running gdbserver or other debugging stub that uses the GDB remote protocol using:
(gdb) target remotehost
:port
where host
is the host name or IP address of the
machine the stub is running on, and port
is the
port number it is listening on for TCP connections.