summaryrefslogtreecommitdiff
path: root/src/cli/run.zig
Commit message (Collapse)AuthorAge
* agent: syscalls on a stack of the agent's, clones made inside the handler; ↵Gabriel Schneider7 days
| | | | | | | | | | | | | | | what a recording may hold Syscall User Dispatch now runs its handler on an alternate stack a thread (a thread's own stack may not hold a signal frame; node makes such threads), and makes clone, clone3 and vfork itself: the child leaves through the gate with the target's registers instead of being stepped into with the trap flag. Paths and written buffers are cut at 256 bytes (--capture), a watch or snapshot above 1 MiB is refused, and ztrace run ends a recording that is full (--max-size) with the target killed and the file closed. Co-Authored-By: Claude Fable 5.2 <[email protected]>
* agent: the in-process backend, and ztrace run's options for itGabriel Schneider7 days
| | | | | | | | | | | | | | libztrace-agent.so (preloaded) and libztrace-agent.a (linked in), one source: map and thread_start at startup; alloc/free from the interposed allocator; syscall_enter/exit through Syscall User Dispatch; call/ret from int3 hooks; mem_write from watched regions diffed in-process; the target-side API (include/ztrace.h, and the ztrace-agent module for Zig). ztrace run turns each on (--alloc --syscalls --hook --watch), chooses the moments (--cut), and stops the target at event kinds without ptrace (--stop-at, --read, -i). test-agent records real targets and checks the recordings. Co-Authored-By: Claude Fable 5.2 <[email protected]>
* ztrace: the event, the ring, the recording, a ptrace loopGabriel Schneider7 days
One 64-byte Event for every backend; a shared-memory ring from target to tracer with stop/resume; a Recorder that folds events into xitdb moments (registers, memory in 64-byte chunks with known-byte masks, strings) and a Trace that reads any moment back; a minimal ptrace Process; ztrace record, run and dump. Per-area build files so the areas grow apart.