gdb_get_variables
Retrieve local variables for a specific stack frame and thread in a GDB session. Provide session ID from gdb_start_session; optionally specify thread ID and frame number.
Instructions
Get local variables for a specific stack frame in a thread. 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_variables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| thread_id | No | Thread ID (None for current) | |
| frame | No | Frame number (0 is current) |