summaryrefslogtreecommitdiff
path: root/build/debugger.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build/debugger.zig')
-rw-r--r--build/debugger.zig16
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" });