gdb_get_backtrace
Retrieve the stack backtrace for a specific thread or the current thread to identify function calls, file locations, and line numbers during debugging sessions.
Instructions
Get the stack backtrace for a specific thread or the current thread. Shows function calls, file locations, and line numbers. Requires session_id parameter (obtained from gdb_start_session).
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": "gdb_get_backtrace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| thread_id | No | Thread ID (None for current thread) | |
| max_frames | No | Maximum number of frames to retrieve |