From 0ec2376cae2fdfc50e90d930ebc86c7a5b7f5594 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 11 Nov 2026 20:08:00 -0300 Subject: trace: what push, call and ret touch; names for data; the stack's roles, sharper For a disassembly that points at the stack word it touched. The stack's own instructions have touches (push, call and enter write at rsp-8; pop and ret read at rsp; leave at rbp), and a rep string instruction its whole range. An address a global or static object holds is named (head+0, libc.so.6!main_arena+96). The saved rbp has its role at the push that makes it; every local in a shared word is given; the stack protector's copy is found by seeing its store; ztrace show labels each stack word. Six bytes a moment and 3% slower on the list by instruction. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- src/trace/event.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/trace/event.zig') diff --git a/src/trace/event.zig b/src/trace/event.zig index 1447c8e..2900be7 100644 --- a/src/trace/event.zig +++ b/src/trace/event.zig @@ -41,7 +41,9 @@ pub const Kind = enum(u16) { /// The instruction at the pc is about to touch memory: a0=addr a1=len /// a2=pc. aux: 1 it reads there, 2 it writes there, 3 both. From a /// debugger, which sees the instruction before it runs; what is there is - /// recorded beside it, and what a write left there after the step. + /// recorded beside it, and what a write left there after the step. What + /// its operands name, then what the stack's own instructions touch + /// without naming it (`Debugger.Touch`). touch = 22, /// The instruction at the pc is a call, a jump or a return: a0=where it /// goes a1=1 when it will go there (0: a conditional jump that falls -- cgit v1.3