diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-12 01:40:04 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-12 01:44:59 -0300 |
| commit | aefde257db6e7cf683b923498c0d471885ab67a9 (patch) | |
| tree | c81a17d4ed07a62f2c9f1d237419e6d130dd012d /build/debugger.zig | |
| parent | 60e07feef401d9044db3a1c925cb9d1f6d20dac9 (diff) | |
| download | computeranim-aefde257db6e7cf683b923498c0d471885ab67a9.tar.gz computeranim-aefde257db6e7cf683b923498c0d471885ab67a9.zip | |
record: --until ends the recording at a place
The ASan scene cut its run by a count of steps, which moves with the
compiler; --until __asan_report_store1 ends it where the report begins.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'build/debugger.zig')
| -rw-r--r-- | build/debugger.zig | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/build/debugger.zig b/build/debugger.zig index e50c82c..f0b0e7c 100644 --- a/build/debugger.zig +++ b/build/debugger.zig @@ -165,6 +165,22 @@ pub fn add(ctx: Ctx) void { // The 64 are counted from fib, whatever the loader did before. from_show.expectStdOutMatch(" 64 step\n"); step.dependOn(&from_show.step); + // From main, by instruction, to fib: --until ends the recording there. + const until = b.addRunArtifact(ctx.exe); + until.addArgs(&.{ "record", "--from", "main", "--until", "fib", "-o" }); + const until_recording = until.addOutputFileArg("until.ztrace"); + until.addArg("--"); + until.addArtifactArg(fib); + until.addArg("10"); + until.expectStdErrMatch("ended at fib, as --until asked"); + const until_show = b.addRunArtifact(ctx.exe); + until_show.addArgs(&.{ "show" }); + until_show.addFileArg(until_recording); + until_show.addArg("-1"); + // WHERE resolves as -b's does: a function's place past its prologue. + until_show.expectStdOutMatch("rip "); + until_show.expectStdOutMatch(" (fib+"); + step.dependOn(&until_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" }); |
