debug_backtrace
Reconstruct an approximate call stack from PC, LR, and a heuristic stack scan on a halted STM32 core, returning likely return addresses innermost first for crash analysis.
Instructions
Reconstruct an approximate call stack from PC, LR, and a stack scan.
Requires a halted core and an ELF-loaded session. The stack scan is a heuristic: it reports PC, LR, then likely return addresses (thumb addresses into code symbols) found in the stack window, in stack order.
Args: session_id: Session ID from debug_session_start. words: Stack words to scan (default 64, max 256).
Returns: Approximate call frames, innermost first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>"
},
"name": "debug_backtrace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| words | No | ||
| session_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |