dosbox_find_cave
Locate zero-filled runs in a guest code segment large enough for a trace cave, sorted longest first, so you can choose an offset for installing a trace hook.
Instructions
Find runs of zero in a guest code segment long enough to hold a trace cave. Padding between routines is the usual supply. Longest first; pass one of these offsets to dosbox_install_trace.
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": {
"segment": "<segment>"
},
"name": "dosbox_find_cave"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | ||
| segment | Yes | Guest code segment, e.g. 0x1000. | |
| bytes_needed | No | How much room the cave needs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||