var_set
Set a C/C++ variable to a new value on a halted target. Supports any assignable lvalue, e.g., struct fields and array elements.
Instructions
Set a C/C++ variable to a new value on the target.
The target must be halted. Supports any assignable lvalue.
Args: name: Variable name (e.g., "counter", "myStruct.field", "array[0]") value: New value as C expression (e.g., "42", "0xFF", "NULL")
Returns: Confirmation of variable modification
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": {
"name": "<name>",
"value": "<value>"
},
"name": "var_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| value | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |