dosbox_install_trace
Install a live trace in a running DOSBox-X guest without a debugger by redirecting a near CALL through a zero-filled cave that records registers, flags, and memory while keeping the emulator at full speed.
Instructions
Watch a running guest's code without a debugger. Redirects one near CALL in the live code segment through a zero-filled cave that calls the displaced target, preserves its flags, and records the registers and memory words you name -- then read them with dosbox_read_trace while the guest runs at full speed. Nothing on disk changes; the patch dies with the emulator. captures take: a register (ax bx cx dx si di bp sp), a segment register (ds es ss cs), flags, or memory -- word:0x9D10, byte:DS:0x7A0E, word:ES:0x0004. Memory is read through whatever DS holds when the cave runs; capture ds too if the routine changes it. Give expect_hex (the three bytes the call site should hold) so the trace refuses rather than landing on a moved target.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | ||
| handle | No | Name for this trace; defaults to segment_offset. | |
| call_at | Yes | Offset of the near CALL to displace. | |
| cave_at | Yes | Offset of a zero-filled run, from dosbox_find_cave. | |
| segment | Yes | Guest code segment. | |
| captures | Yes | What to record at each hit. | |
| expect_hex | No | The three bytes the call site must hold. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||