summaryrefslogtreecommitdiff
path: root/build/debugger.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 16:45:15 -0300
committerGabriel Schneider <[email protected]>2026-11-10 16:45:15 -0300
commit47f43f0f26b08901c1ddd16aacbe50c2c843ab8a (patch)
tree4d2132989b3d551104d3ddfda2bf1f4ce3171338 /build/debugger.zig
parent165bb6c1344b98de7bef1d3c2b72147b4a40797a (diff)
downloadcomputeranim-47f43f0f26b08901c1ddd16aacbe50c2c843ab8a.tar.gz
computeranim-47f43f0f26b08901c1ddd16aacbe50c2c843ab8a.zip
record: --from runs through to a place before the first stop
By instruction, a dynamic program's loader and C library start are a million moments nobody watches: the list of anim/tools from main to its exit is 3 743. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'build/debugger.zig')
-rw-r--r--build/debugger.zig14
1 files changed, 14 insertions, 0 deletions
diff --git a/build/debugger.zig b/build/debugger.zig
index 9779ecd..d164072 100644
--- a/build/debugger.zig
+++ b/build/debugger.zig
@@ -92,6 +92,20 @@ pub fn add(ctx: Ctx) void {
// ... which the library's tests read too.
paths.addOptionPath("fib_recording", recording);
+ // From a place on, by instruction: what ran before fib is no moment but its syscalls.
+ const from = b.addRunArtifact(ctx.exe);
+ from.addArgs(&.{ "record", "--from", "fib", "--steps", "64", "-o" });
+ const from_recording = from.addOutputFileArg("from.ztrace");
+ from.addArg("--");
+ from.addArtifactArg(fib);
+ from.addArg("10");
+ from.expectStdErrMatch(" 64 moments, ");
+ const from_show = b.addRunArtifact(ctx.exe);
+ from_show.addArg("show");
+ from_show.addFileArg(from_recording);
+ from_show.expectStdOutMatch(" 1 breakpoint\n");
+ step.dependOn(&from_show.step);
+
// A source line a moment, a watched global, to the exit code.
const lines = b.addRunArtifact(ctx.exe);
lines.addArgs(&.{ "record", "--by", "line", "-w", "dist", "-w", "queue,8", "-o" });