Terminology
System Level Debugging
Profiling | Amount of execution time for each function
Code Coverage | Execution of code
Trace | Call hierarchy with execution history
Tips and Tricks
Note that you will only get limited breakpoint location options in the code if you have high optimization because certain lines of code (like declarations) are disappeared.
Evaluating Debuggers
- Target support - chip models and families, revisions; dev board and interface support (JTAG, DAP)
- Loading - flash the program to on- and off-chip flash, or on- and off-chip RAM; read/write on-chip flash
- Execution control - basic operations like run/step/jump/halt/reset and using software and hardware breakpoints; instruction breakpoints and variable/address read/write, data breakpoints (watchpoints); signal catchpoints
- Internal state - read/write variables, processor registers, peripheral registers, and memory locations when halted; view memory range, examine runtime stack and call stack
- Multi-core support - context switching between cores; execution control on cores independently
- Trace - trace abilities, memory amount, types of profiling
Multi-core Notes
Each core has an independent symbol table, and debugger can load a program to any set of cores.
Profiling
Statistical profiling stops the processor so many times per second and each time it records the PC to identify the probability of being inside a certain function on each peek. It's like a fixed-rate sampling process that gives you an estimate of the program profile. It can of course miss functions entirely.
A trace-based profile has all the actual execution history, and with included timing information can give you a more complete picture.