Controlling debug states
One key feature of any debugger is to be able to control the debug state of the target system. This section will explain what debug states are and how they can be used for debugging.
What are debug states?
Debug states refer to various operational conditions or modes that a target device can be in. The states help developers diagnose issues, optimize code parts, and ensure correct software functionality. The most common states are as follows:
- Idle: Target device is not being debugged and is free-running.
- Debugging: Target device is in debug mode. Some device features and clocks may behave differently to give better system insight during debugging.
- Halted: Target device is halted. No code is executed.
- Stepping: Target executes exactly one instruction or code line.
- Reset: Target is undergoing a reset process that resets the system into a predefined default configuration.
- Sleep: Target device is in a low-power state, conserving energy.
- Faulted: Target device has...