summaryrefslogtreecommitdiff
path: root/anim/src/ties.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-11 00:06:30 -0300
committerGabriel Schneider <[email protected]>2026-11-11 01:16:48 -0300
commitc3d9f7ba5effd615374b1359ad98ecf801559f83 (patch)
tree07f85932abc1df23c722bcd1bd1b3b65bca28f2e /anim/src/ties.zig
parentc94ade9e77a811d3ff75ffc2889a65375262ab1f (diff)
downloadcomputeranim-c3d9f7ba5effd615374b1359ad98ecf801559f83.tar.gz
computeranim-c3d9f7ba5effd615374b1359ad98ecf801559f83.zip
canim: a call followed down to the kernel; rows that say what they do; the heap from the inside
From the user. The disassembly can descend: the syscalls scene is glibc's hello by instruction, and open is followed from main through its PLT stub, whose jmp reads the GOT, into libc's wrapper to the syscall row, which crosses to the kernel's window under it, and back up. The band keeps the calls so far as strace writes them. Operands lose their size words and show a width as byte cells only where nothing else says it. A compare shows its values and the flags it leaves, a jump the flags it reads, lea its result, an indirect jump its target and the slot it read, a call that has run its C form. The backtrace has its newest frame at the bottom. A new scene shows glibc 2.44's heap from blocks that exist: chunks read by fields (a size with its bits, a protected pointer), the free list as arcs, the tcache in a loupe, the program's list over malloc's own. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/src/ties.zig')
-rw-r--r--anim/src/ties.zig8
1 files changed, 6 insertions, 2 deletions
diff --git a/anim/src/ties.zig b/anim/src/ties.zig
index 323cecf..d3a9ec7 100644
--- a/anim/src/ties.zig
+++ b/anim/src/ties.zig
@@ -77,6 +77,9 @@ pub const Place = union(enum) {
/// where its pin lane runs (canvas pixels: x, the first row's top, the
/// row's height). A link to a word outside it ends at its edge.
pub var stack_window: ?struct { first: u64, slots: usize, x: f32, top: f32, row: f32 } = null;
+/// The source's line waits (a `descent`: the pc is in code without source):
+/// the thread waits with it, primary and 2 units.
+pub var thread_waits = false;
/// What this frame's components have said so far, in canvas pixels: left, top, right, bottom.
/// shortcut: one table for the process, emptied by `Ties.draw`; a scene with two players at once wants it on the frame.
@@ -175,6 +178,7 @@ pub const Ties = struct {
pub fn draw(g: *const Ties, f: *sk.Frame, at: anim.Placed) void {
defer said = 0;
defer stack_window = null;
+ defer thread_waits = false;
const now = g.cursor.now(at);
// Diving or surfacing, the panels are on their way: no ties.
for (@import("context.zig").zoomed) |z| if (z != null) return;
@@ -193,8 +197,8 @@ pub const Ties = struct {
fn thread(raw: ui.Ui, at: anim.Placed, k: f32) void {
const line = find(.source) orelse return;
const x = at.xf.apply(.{ theme.metric.tie.thread_x, 0 })[0];
- const gold = theme.mark(.current).solid;
- const kind = [2]f32{ theme.metric.bracket.thread[0] * k, theme.metric.bracket.thread[1] * k };
+ const gold = if (thread_waits) ui.rgb(theme.color.text.primary) else ui.rgb(theme.mark(.current).solid);
+ const kind = if (thread_waits) [2]f32{ theme.metric.bracket.quiet[0] * k, theme.metric.bracket.quiet[1] * k } else [2]f32{ theme.metric.bracket.thread[0] * k, theme.metric.bracket.thread[1] * k };
raw.bracket(x, line[1] + 2 * k, line[3] - 2 * k, gold, kind, 1, false);
var bottom = line[3] - 2 * k;
var top = line[1] + 2 * k;