Daily workflow
Launch or attach a debug session
Use matching symbols and a compatible backend to investigate firmware.
Configure the debug device and connection in Target Configuration. Choose a compatible debugger/backend and use the ELF from the firmware running on the target.
Launch may reset and halt the target. Attach is intended to connect to an existing execution state. Check the backend configuration before using either on timing-sensitive equipment.
Set a source breakpoint, start debugging, and confirm that the reported program counter and source line match your image. Use continue, pause, step, locals, watches and the call stack to narrow the fault. Optimized code may reorder instructions or remove variables; use suitable debug information rather than assuming the debugger is wrong.
For register and memory inspection, pause when a consistent snapshot is required. Reading some peripheral registers has side effects. Consult the exact device description and reference manual before polling them.