From 3fdb67c479dcc1ad0f1e51832bc086622692249c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 11:43:24 -0300 Subject: debugger: steps by instruction and line, breakpoints, hooks, watches, threads; ztrace dbg ptrace.zig follows the threads a target makes, attaches, tells a step from a breakpoint, and writes memory in one call (through /proc/pid/mem where the page is read-only). Debugger.zig is the layer above: cont, stepi, step (a source line, through std.debug's DWARF), breakpoints with hooks, syscall stops and hooks with the path or buffer captured, watched regions sent as the words that changed, and every stop an event. Symbols.zig is modules, ELF symbols and line tables; syscalls.zig their names and shapes. ztrace dbg is a small REPL on it that records as it goes and looks back into the recording; ztrace record stops by instruction, line, syscall or breakpoint, prints syscalls as strace does, and ends cleanly when the recording is full. Co-Authored-By: Claude Fable 5.2 --- src/trace/root.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/trace/root.zig') diff --git a/src/trace/root.zig b/src/trace/root.zig index 62a9fa7..fd91d9a 100644 --- a/src/trace/root.zig +++ b/src/trace/root.zig @@ -9,6 +9,9 @@ pub const store = @import("store.zig"); pub const Recorder = store.Recorder; pub const Trace = store.Trace; pub const ptrace = @import("ptrace.zig"); +pub const Debugger = @import("Debugger.zig"); +pub const Symbols = @import("Symbols.zig"); +pub const syscalls = @import("syscalls.zig"); /// Inside the target: the ring it was handed. pub const client = @import("client.zig"); /// Inside the tracer: a target running with a ring. @@ -19,6 +22,9 @@ test { _ = Ring; _ = store; _ = ptrace; + _ = Debugger; + _ = Symbols; + _ = syscalls; _ = client; _ = host; } -- cgit v1.3