diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 14:35:56 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 14:39:55 -0300 |
| commit | 97ce7f485fc0419df693fdf16d634e9e9a6085fc (patch) | |
| tree | 9d36463512024242665c7836b94a4de4e541b3bf /src/trace/event.zig | |
| parent | f8740f6996eefc235af066a6686f52847c158a6b (diff) | |
| download | computeranim-97ce7f485fc0419df693fdf16d634e9e9a6085fc.tar.gz computeranim-97ce7f485fc0419df693fdf16d634e9e9a6085fc.zip | |
context: what an instruction is about to touch, and the call chain
At a stop the instruction at the pc is decoded against the registers it
will run with (capstone's operands): a touch event for each memory operand
(address, size, read or write), what is there recorded with it, and what a
write left there read back at the next stop. An instruction-level
recording so has every memory write of the stepped thread, nothing watched.
The frames of the call chain are recorded and their return addresses
named; telescope.backtrace walks them from the recording and ztrace show
prints them. Process.read no longer panics on address 0.
Diffstat (limited to 'src/trace/event.zig')
| -rw-r--r-- | src/trace/event.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/trace/event.zig b/src/trace/event.zig index 7830979..6f7a258 100644 --- a/src/trace/event.zig +++ b/src/trace/event.zig @@ -38,6 +38,11 @@ pub const Kind = enum(u16) { map = 20, /// a0=addr a1=len unmap = 21, + /// 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. + touch = 22, // Instrumentation (compiler passes, hooks). /// a0=callee (the string id of its name, or its address when the |
