summaryrefslogtreecommitdiff
path: root/anim/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'anim/build.zig')
-rw-r--r--anim/build.zig11
1 files changed, 7 insertions, 4 deletions
diff --git a/anim/build.zig b/anim/build.zig
index 2263c61..9c95ff5 100644
--- a/anim/build.zig
+++ b/anim/build.zig
@@ -16,7 +16,7 @@
const std = @import("std");
const sketchbook = @import("sketchbook");
-const scenes = [_][]const u8{ "title", "fib", "list", "sort", "syscalls", "musl", "zoom", "heap", "gallery", "column", "column_sort", "intro_memory", "intro_stack", "intro_code", "asan" };
+const scenes = [_][]const u8{ "title", "fib", "list", "sort", "syscalls", "musl", "zoom", "heap", "gallery", "column", "column_sort", "intro", "asan" };
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
@@ -139,9 +139,12 @@ pub fn build(b: *std.Build) void {
// The introduction's: the same program as the compiler alone makes it
// (no tracer's calls in reverse; no red zone, so its prologue makes
// room for its locals: `push rbp; mov rbp, rsp; sub rsp, 0x18`; its
- // locals named by the debug info), from main's call of reverse to
- // line 22, past the load; `head` watched, the global the list hangs from.
- .{ .name = "intro", .source = "list.c", .by = "insn", .glibc = true, .cc = &.{ "clang", "-O0", "-g", "-mno-red-zone", "-no-pie", "-fno-stack-protector", "-Wl,-z,now" }, .from = "list.c:41", .until = "list.c:22", .alloc = true, .watch = &.{"head"}, .program = "list" },
+ // locals named by the debug info), from main's push(9) (its call of
+ // malloc, which chapter II steps over) to line 22, past the load; the
+ // program's alone (no agent: malloc changes only what glibc's does),
+ // glibc's heap at each stop for the list's nodes; `head` watched, the
+ // global the list hangs from.
+ .{ .name = "intro", .source = "list.c", .by = "insn", .glibc = true, .cc = &.{ "clang", "-O0", "-g", "-mno-red-zone", "-no-pie", "-fno-stack-protector", "-Wl,-z,now" }, .from = "list.c:40", .until = "list.c:22", .heap = true, .watch = &.{"head"}, .program = "list" },
// `hello` again, built by Zig against musl, static: no PLT; musl's
// own source (`open.c`, `syscall_cp`) on the way down to the kernel.
.{ .name = "musl", .source = "hello.c", .by = "insn", .from = "main", .steps = "166", .reads = "note" },