summaryrefslogtreecommitdiff
path: root/anim/scenes/syscalls.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-11 14:43:13 -0300
committerGabriel Schneider <[email protected]>2026-11-11 16:17:33 -0300
commit3093eb55ac4a7054f51f06ea2786b5f9c9ec73f6 (patch)
treef1bc91879a447f178dfaba39d0df107d01e557bd /anim/scenes/syscalls.zig
parenta72831d5c322078260314c305ddd940e4967947d (diff)
downloadcomputeranim-3093eb55ac4a7054f51f06ea2786b5f9c9ec73f6.tar.gz
computeranim-3093eb55ac4a7054f51f06ea2786b5f9c9ec73f6.zip
canim: a minimap in each pane; source wherever it can be had, libc's included
From the user. Each pane with more than it shows carries a strip of its whole column at its right edge, the pane's window outlined and what happens off it marked there; the corner minimap is gone and the dive folds each column of the map into its pane's strip. The source panel follows the pc into any file the build has: glibc's own, from the distro's debuginfod by an optional step that caches them by build id (zig build sources; nothing else touches the network), and musl's, from Zig's lib directory. The syscalls scene shows open64.c on the way down, and a new scene follows the same call through a Zig-built musl. A graph's counts and inks are as of the moment shown. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/scenes/syscalls.zig')
-rw-r--r--anim/scenes/syscalls.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/anim/scenes/syscalls.zig b/anim/scenes/syscalls.zig
index e9f0ae5..b795116 100644
--- a/anim/scenes/syscalls.zig
+++ b/anim/scenes/syscalls.zig
@@ -1,7 +1,8 @@
//! A program that needs the kernel four times: open, read, close, write.
//! glibc's `hello`, by instruction from main: `open` followed down (the
//! disassembly a `descent`: main's call, the PLT's stub, libc's wrapper,
-//! the kernel's window at the floor, and back up), then the other three
+//! its source, open64.c, beside it where the build has it (`zig build
+//! sources`), the kernel's window at the floor, and back up), then the other three
//! stepped over, each crossing under its call. The band is the calls so
//! far, as strace writes them.
//!
@@ -66,7 +67,7 @@ fn frame(s: *anim.Frame) void {
canim.descent.step(cur, s, .moment);
s.wait(t.phrase_rest);
// The wrapper at a run, veiled; its last three instructions walked, named as they run.
- says.line(s, "libc's `open` is a wrapper: no source, its own code,\nup to the instruction that calls the kernel.");
+ says.line(s, "libc's `open` is a wrapper: a few lines of C, open64.c,\nup to the instruction that calls the kernel.");
cur.hurry(s, .moment, crossing - 3, .{});
says.line(s, "Its last three set r8 to 0, rdi to AT_FDCWD (-100)\nand rax to 257: openat's number.");
cur.walk(s, .moment, crossing);