Depending on whether debug affects the state of the system or not, debug methods are broadly classified as invasive debug or non-invasive debug.
Debug methods that affect the state of the system are called invasive. An invasive method involves stopping execution, modifying registers, or reading from and writing to memory using the core. Examples of invasive debug include self-hosted debug and external debug.
Debug methods that do not affect the state of the system are called non-invasive. A non-invasive debug feature permits the observation of data or program flow without permitting the direct modification of data or program flow.
Examples of non-invasive debug include:
- The Performance Monitoring Unit, without interrupts
- The PC Sample-based Profiling Extension