summaryrefslogtreecommitdiff
path: root/build/debugger.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 20:28:33 -0300
committerGabriel Schneider <[email protected]>2026-11-10 20:28:33 -0300
commitdbfab7b5cdd76787b6cca72f792acfa3cebcbab5 (patch)
tree336f9e84c913991f037328a4132d93af5c62a544 /build/debugger.zig
parentdc3b58781420be6070fca896e55776bc27db905d (diff)
downloadcomputeranim-dbfab7b5cdd76787b6cca72f792acfa3cebcbab5.tar.gz
computeranim-dbfab7b5cdd76787b6cca72f792acfa3cebcbab5.zip
debugger: what a write gives the kernel is memory too; --from passes other stops
A write's buffer was recorded as the syscall's payload only: a reader of the moment's memory found there what an earlier stop had seen of it (zeros, in SQLite's page). And record --from with --by syscall took the loader's first syscall for the place and gave up its breakpoint. Both found by the first animation of a real program. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'build/debugger.zig')
-rw-r--r--build/debugger.zig13
1 files changed, 13 insertions, 0 deletions
diff --git a/build/debugger.zig b/build/debugger.zig
index d164072..6fa6f8c 100644
--- a/build/debugger.zig
+++ b/build/debugger.zig
@@ -105,6 +105,19 @@ pub fn add(ctx: Ctx) void {
from_show.addFileArg(from_recording);
from_show.expectStdOutMatch(" 1 breakpoint\n");
step.dependOn(&from_show.step);
+ // ... and by syscall: the loader's own are passed, not taken for the place.
+ const from_sys = b.addRunArtifact(ctx.exe);
+ from_sys.addArgs(&.{ "record", "--by", "syscall", "--from", "fib", "-o" });
+ const from_sys_recording = from_sys.addOutputFileArg("from-sys.ztrace");
+ from_sys.addArg("--");
+ from_sys.addArtifactArg(fib);
+ from_sys.addArg("10");
+ from_sys.expectStdErrMatch("exit 0");
+ const from_sys_show = b.addRunArtifact(ctx.exe);
+ from_sys_show.addArg("show");
+ from_sys_show.addFileArg(from_sys_recording);
+ from_sys_show.expectStdOutMatch(" 1 breakpoint\n");
+ step.dependOn(&from_sys_show.step);
// A source line a moment, a watched global, to the exit code.
const lines = b.addRunArtifact(ctx.exe);