From 47f43f0f26b08901c1ddd16aacbe50c2c843ab8a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 16:45:15 -0300 Subject: 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 --- build/debugger.zig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'build') 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" }); -- cgit v1.3