Debugging embedded applications depends significantly on the type of the target embedded systems. Microcontroller manufacturers often provide specialized debuggers for their microcontroller units (MCUs) as well as hardware support for remote debugging using a Joint Test Action Group (JTAG) protocol. It allows developers to debug the microcontroller code immediately after the MCU starts executing instructions.
If the target board runs Linux, the most practical method of debugging is to use an extensive debug output and to use GDB as an interactive debugger.
In this recipe, we will learn how to run our application in a command-line debugger: GDB.