pyocd_debug_backtrace
Performs stack backtrace via DWARF CFI or heuristic scanning to show the full call chain, revealing how code reached the current instruction.
Instructions
Perform precise stack backtrace to show the full call chain. Uses DWARF CFI (.debug_frame) or EHABI (.ARM.exidx) for frame-accurate unwinding across all ARM toolchains (AC5/AC6/GCC). Falls back to heuristic stack scanning with BL validation if precise unwinding fails. Returns ordered frames: depth 0 = current PC, deeper = callers. Essential for understanding HOW code reached the current point.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_frames | No | Maximum frames to return (default 16) | |
| scan_depth | No | Bytes to scan from SP upward (default 512) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |