From fa5d150ac6977264f0704e9af664f8150bd25127 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 22:50:34 -0300 Subject: design: arc, a pointer to a row of its own panel is drawn From the user, on the loupe's mock: a pointer in memory named a row two above it and nothing showed it. In a dump, a loupe and the stack a pointer whose target is a row of the same panel is an arc in a lane at the panel's edge, as a jump is in the disassembly: quiet while it stands, full ink in the step that writes or reads it, a stub when the target is just off the window. A chain shares a lane. A loupe carries the arcs among its own rows; the stack's frame chain gets one only when touched. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- design/README.md | 84 ++++++++++-- design/mock/09-context-480.png | Bin 36225 -> 36400 bytes design/mock/09-context.png | Bin 234918 -> 235217 bytes design/mock/09-context.svg | 112 ++++++++-------- design/mock/10-context-step-480.png | Bin 37263 -> 37253 bytes design/mock/10-context-step.png | Bin 239058 -> 239232 bytes design/mock/10-context-step.svg | 112 ++++++++-------- design/mock/11-context-lens-480.png | Bin 36483 -> 36630 bytes design/mock/11-context-lens.png | Bin 227267 -> 227838 bytes design/mock/11-context-lens.svg | 134 ++++++++++--------- design/mock/12-calls-subject-480.png | Bin 32985 -> 33189 bytes design/mock/12-calls-subject.png | Bin 201791 -> 201794 bytes design/mock/12-calls-subject.svg | 8 +- design/mock/13-sqlite-row-480.png | Bin 32655 -> 32488 bytes design/mock/13-sqlite-row.png | Bin 227685 -> 227680 bytes design/mock/13-sqlite-row.svg | 166 +++++++++++------------ design/mock/14-sqlite-page-480.png | Bin 37579 -> 37621 bytes design/mock/14-sqlite-page.png | Bin 236736 -> 236738 bytes design/mock/14-sqlite-page.svg | 44 +++--- design/mock/15-marks-480.png | Bin 18542 -> 18436 bytes design/mock/15-marks.png | Bin 264805 -> 265080 bytes design/mock/15-marks.svg | 126 +++++++++--------- design/mock/19-map-1080.png | Bin 1018023 -> 1021707 bytes design/mock/19-map-480.png | Bin 45132 -> 45442 bytes design/mock/19-map.png | Bin 905335 -> 908493 bytes design/mock/19-map.svg | 252 +++++++++++++++++++---------------- design/mock/21-loupe-480.png | Bin 38289 -> 38432 bytes design/mock/21-loupe.png | Bin 245970 -> 246423 bytes design/mock/21-loupe.svg | 200 +++++++++++++-------------- design/mock/context.py | 76 +++++++++-- design/mock/dense.py | 2 +- design/mock/map.py | 9 +- design/motion.md | 17 +++ 33 files changed, 756 insertions(+), 586 deletions(-) (limited to 'design') diff --git a/design/README.md b/design/README.md index 02d5960..a6cc6dd 100644 --- a/design/README.md +++ b/design/README.md @@ -62,6 +62,7 @@ this table. | | [`line`](#line) | a line of source | `current`, `trail`; wide numbers | | | [`bytes`](#bytes) | sixteen bytes of a dump and what they read as | field runs, marks per run; wide address | | | [`call`](#call) | one frame of the call chain | `row`, `span`; `newest` | +| | [`arc`](#arc) | a pointer to a row of the same panel, drawn | standing, `touched`; a stub | | 3 panel | [`registers`](#registers) | all seventeen | | | | [`stack`](#stack) | a window on the newest frame's words, and the frames they belong to | 8 or 6 slots | | | [`backtrace`](#backtrace) | the call chain as rows | in the `none` split; the view of `calls`; a lens's drawing | @@ -387,7 +388,8 @@ A word of the stack, pwndbg's way and a little more. | x | Column | | | --- | --- | --- | -| 10 | pins | the `row` pin's lane, to 112: every register whose value is this word's address | +| 4, 10 | arcs | the [`arc`](#arc) lanes: a word holding the address of another slot in the window | +| 16 | pins | the `row` pin's lane, to 112: every register whose value is this word's address | | 172 | offset | from rsp, hex, `+18`, faint, ranged right in four characters (`-8` above rsp) | | 184 | address | stack ink, `lead`; then the chain, its first hop the word's content | | right | role | what the word is, where the recording knows it, ranged right where the chain's room ends: `saved rbp`, `saved rbx` (dim); a local's name (primary); at the process's start `argc`, `argv[0]`, `argv end`, `envp end`, `auxv` (dim) | @@ -477,15 +479,16 @@ bytes and a pointer 8, never two fields and never a store's width. | x | Column | | | --- | --- | --- | -| 7 | bracket | `quiet`, on a row that holds a drawn thing; `tie` when a projection ends here | -| 18 | address | region ink, `lead`; at 60% on a row that holds no drawn thing | +| 4, 10, 16 | arcs | the [`arc`](#arc) lanes: pointers to rows of the same dump | +| 24 | bracket | `quiet`, on a row that holds a drawn thing; `tie` when a projection ends here | +| 34 | address | region ink, `lead`; at 60% on a row that holds no drawn thing | | 132 | sixteen `byte`s | on a pitch of 30, 12 more after the eighth | | 640 | reading | what the runs read as, left to right, a character apart: a number in decimal (in its byte order); a pointer as `points` and its `address`, `NULL` dim; text in quotes, C's escapes, in a string's ink; a run left to the eye, or `loose`, as nothing; the chunk's size word before an allocation as a note in Go 18, faint (`malloc's: a chunk of 32`). Cut at the panel's edge with a faint `…` | **Wide address.** The bytes begin 12 after the address ends, and at 132 -at least: an address of up to eight digits leaves them at 132; the stack's -twelve put them at 174, and the reading at 682 (508 after the first -byte, as always). A dump sets this once, by the widest address in its +at least: an address of up to seven digits leaves them at 132; the stack's +twelve put them at 190, and the reading at 698 (508 after the first byte, +as always). A dump sets this once, by the widest address in its window, so its rows keep one column. The reading replaces a hexdump's text column: where bytes are text the @@ -522,6 +525,55 @@ One frame of the call chain, in two forms. (`n=4`, primary), file and line ranged right, dim. Arguments where the debug info gives them. +### arc + +A pointer whose target is a row of the same panel is drawn, not only read: +an arc from the pointer's row to the row it names, in lanes at the +panel's left edge. It is the disassembly's jump lane given to data, in +every panel of rows that holds pointers: a dump (the band's view, +`memory`), a [`loupe`](#loupe), the stack. + +| Part | Drawn | +| --- | --- | +| lanes | a dump and a loupe: three, at 4, 10 and 16 from the panel's left edge (the quiet bracket moves to 24, the address to 34, the bytes 12 after it, 132 at least). The stack: two, at 4 and 10 (the pins start at 16) | +| arc | 2 units, corners of radius 4, in the ink of the region pointed into: out of the pointer's row at its left (x 21), along its lane, into the target's row at its left, head 7 by 8 at x 22, before the bracket and the address. Going up it leaves its row 9 down and arrives 15 down (going down, 15 and 9), so a chain of pointers (1004090 → 1004070 → 1004050) runs in one lane without touching | +| ink | standing: 60% toward the page. Full: in the step that writes or reads the pointer, and always in a loupe, which was opened to show them | +| a target mid-row | the head on its row; the `read` or strike on the target's own bytes says which | + +**Nesting.** Overlapping spans take separate lanes, the longest outermost; +spans that do not overlap share one. Nested arcs never cross; interleaved +ones cross once, as jump arrows do. Three lanes (two in the stack) is the +most a panel holds before it is noise: past them the arcs of the step come +first, then the shorter; the rest are only read, and nothing is hidden, +since every pointer's reading names its target. + +**Out of the window.** A pointer whose target row is in the same region +but not shown: in the step that writes or reads it, a stub along its lane +to the panel's rule, head on the rule; otherwise nothing. No count, unlike +a link's stub: the lane has no room for one, the reading names the +address, and the minimap shows where. + +**Which form carries a pointer**, when more than one could: + +- **In a panel**, between its own rows: the arc. The stack's frame chain + (a saved rbp) is the exception: the `call` spans already draw the frames + it makes, so its arc is drawn only in a step that writes or reads it. +- **A loupe** carries the arcs among its own rows; a dump showing the same + rows withholds them while it is open (one place, the one opened for it). + A loupe's stem already ties the pointer it opened from; a loupe never + opens for a target its own rows hold. +- **The lens's drawing** draws the same pointer as its arrow (a node's + `next`); the view's arc is that pointer's bytes. Both stand: they are + the idea and the machine, tied by ink and digits, and a step that turns + the pointer turns the arc at the memory level and the arrow at the idea's. +- **A flat chain** (a register's, a stack word's) whose hop lands on a row + of another panel: its `pin` where that panel has a pin lane (the stack, + a node); otherwise ink and digits. In the step that sets it, a `link`. + No standing line across panels: an echo of the target's row whenever the + pointer's row is current would flicker on every step. + +Its motion is under [`arc`'s verbs](#6-verbs). Mocks 9 to 11, 19, 21. + ## 3. Panels A panel is a tag and rows. Its rows never reorder and none is hidden to @@ -1058,6 +1110,7 @@ Frames at 60 a second. `s` is the frame a strike lands. Curves: | `dive` | from the map to the working frame | one continuous move in which the windows become the panels and the map becomes the minimap. 0 to 6: the windows' outlines go bright. 6 to 24: the rest of the map takes the veil (50%). 24 to 96, `glide`: each window goes from its place on the map to its panel's place, its scale on a logarithm from the map's (half, filling the frame) to the frame's (whole), so its rows grow from 10 units to 20 under the eye, the panels 6 f apart in the frame's reading order (drawing, view, source, registers, disassembly, stack), each drawn over those before; the map, veiled, goes the same 72 f to the minimap's place, its scale from a half to a twentieth, so the windows rise out of it as it falls away; their outlines stay on it and land as the minimap's windows. 72 to 96: the drawing, whose sizes differ between the two, crossfades from the map's to the frame's within its box. 84 to 96: the frame's tags, rules and lanes fade in; the veil on the map lifts as it lands. 96 to 132: still | | `surface` | from the working frame to the map | the dive backwards, a little quicker: 0 to 12 the tags, rules and lanes fade out; 12 to 84, `glide`, the panels shrink into their windows as the minimap grows to fill the frame; 84 to 96 its veil lifts; then the map is still 36 f before anything plays on it | | `flash` | the minimap, at a mark no window shows | a ring 8 across in the mark's colour draws out to 14 and is gone, 12 f, with the mark's own strike or read | +| `arc` | a pointer to a row of its panel | written: with the arm (s−12) the old arc goes dashed; from s+6 it fades (12 f) while the new one draws from the pointer's row along its lane to the target, head first, 12 f, `standard`, at full ink; with the cool at the advance it quiets to standing (24 f). Read: to full ink with the read (6 f), back with the advance. Overwritten with a target off the panel or NULL: it fades from s+6 (12 f). A lane change glides 12 f. Scrolled: it rides its rows, fading as its target leaves. At a run 8 f, at a sprint none | | `advance` | the current marks | last. The thread, the plaques and rip move together: 12 f to an adjacent row, 24 f up to eight rows, `standard`; farther, out and in over 6 f. A taken jump's line draws in the jump lane with it | | `cascade` | a step | `fire` (12); then its effects a level at a time, 18 f apart: CPU (`reg`s, the pc's annotation), memory (`slot`s, `bytes`), the idea (the drawing, by `project`); each armed, then struck; hold 36 f after the last strike and 12 f a further value, 84 at most; `advance`; rest 24 f. A level with nothing on screen to change gives up its slot | | `continue` | a stop far from the last: a breakpoint, not a step. Where the windows' new places are farther than their own heights (another function, another file), it is told on the map: `surface`, the jump there, `dive` | `fire` on the line it leaves from; then the levels as in a `cascade`, but CPU is a wave: every register that changed is struck 2 f after the one above it, in pwndbg's order, the fill in over 6 f, no arm and no pulse (a dozen pulses at once are a flash, and a dozen arms a crowd); memory: the stack's window scrolls or fades to its new place, and the [backtrace](#backtrace)'s frames leave, slide and arrive; the idea; hold 36 f after the last strike; `advance`, the source and disassembly fading through if far; rest. Its marks are only on what was on screen to change | @@ -1154,16 +1207,16 @@ python3 -B gen.py # 1 to 8, then resvg the same way | Mock | Is | Blocks it shows | | --- | --- | --- | -| [9](mock/09-context.png) | `beside`, at rest: `targets/list` stopped at the load in `reverse` (`mock/list-dbg.txt`, moment 2) | every panel; the band as two panels; `address` with `lead`; `chain` cut by `more`; `reg`, rip with flags; `slot` with offsets and roles, `pin` row; `call` spans; `insn` current, ahead, outside under a rule and its name; `line`; `bytes` by fields with number, pointer, loose; `nodes` with pins under, two names on one; `thread`; marks current, held; the minimap, its windows | -| [10](mock/10-context-step.png) | the same, mid-step: the load done (moment 3) | `struck` on rdi; `read` on the annotation, the run and the node's half (`echo`); `link` ending in rdi's pin; `projection`; the minimap | +| [9](mock/09-context.png) | `beside`, at rest: `targets/list` stopped at the load in `reverse` (`mock/list-dbg.txt`, moment 2) | every panel; the band as two panels; `address` with `lead`; `chain` cut by `more`; `reg`, rip with flags; `slot` with offsets and roles, `pin` row; `call` spans; `insn` current, ahead, outside under a rule and its name; `line`; `bytes` by fields with number, pointer, loose; an `arc` standing in the view; `nodes` with pins under, two names on one; `thread`; marks current, held; the minimap, its windows | +| [10](mock/10-context-step.png) | the same, mid-step: the load done (moment 3) | `struck` on rdi; `read` on the annotation, the run and the node's half (`echo`); `link` ending in rdi's pin; `projection`; the read pointer's `arc` at full ink; the minimap | | [11](mock/11-context-lens.png) | `subject`, mid-step | the band at 296 and 200, the drawing a size up, a dump of seven, nine instructions, six slots; the minimap with the subject's windows | | [12](mock/12-calls-subject.png) | `calls` as subject, mid-step: moments 752 to 753 of the fib scene, `fib(4)` calling `fib(2)` | `calls`: nodes current, waiting, done, the caller, results on the shoulder; the `backtrace` as its view, with arguments; `call` spans with arguments; the stack's row with offsets and a role; a `projection` from the return address to the new node; operands of 27 characters whole | | [13](mock/13-sqlite-row.png) | the `backtrace` lens, at rest after a `continue`: stop 120 of the sqlite scene, at `sqlite3BtreeInsert+4` | the backtrace as the band's drawing; a `hexdump` by `fields` of a struct on the stack: twelve-digit addresses, pointer fields and `NULL`, `loose` padding and the bytes past the struct, `pad`, two fields framed as the caption names them, the reading as a list; wide line numbers in the source and the disassembly; frame names whole, shortening the chains beside them; `held` on every register the continue changed, none on the stack's window, which faded in | | [14](mock/14-sqlite-page.png) | `syscalls` as subject, at rest after the crossing: stop 169, `pwrite64` back in `unixWrite` | the kernel's side in the band; a page by `fields` as the kernel took it (`given`): big-endian numbers, bytes left to the eye, text, a `more` row of 253; the stack's window scrolled into the frame (`rsp+20 to rsp+48`), its span open above; flags and registers the crossing changed | | [15](mock/15-marks.png) | the marks sheet: `current`, `struck`, `held` as A (the first videos), B (the catalogue's) and C (a whiter reading), on rows of the list at the load and the store after it | the source's current line; the pc's row; rip; a struck and two held registers; a dump row struck on the one byte that changed and one held; a lens's cell held and struck; the same rows at 1.35 times | -| [19](mock/19-map.png) | the map, mid-step with a loupe open: the same moment unfolded on 3840 by 2160 ([at 1080p](mock/19-map-1080.png)) | the file whole; 69 instructions; memory, the registers, the backtrace whole; the stack from 16 words above rsp, continued at the third column's foot and folded into `more` at the process's start; the loupe as a panel beside memory; the key; the thread across the gutter; the working frame's windows outlined | +| [19](mock/19-map.png) | the map, mid-step with a loupe open: the same moment unfolded on 3840 by 2160 ([at 1080p](mock/19-map-1080.png)) | the file whole; 69 instructions; memory, the registers, the backtrace whole; the stack from 16 words above rsp, continued at the third column's foot and folded into `more` at the process's start; the loupe as a panel beside memory; `arc`s in memory, the loupe and the stack (the frame chain left to the spans); the key; the thread across the gutter; the working frame's windows outlined | | [20](mock/20-dive.png) | `dive`, four instants on one sheet, each at the working frame's size | frame 0 the map; 24 the windows bright, the rest veiled; 60 halfway, the panels rising out of the map as it falls to the corner; 96 the working frame with its minimap | -| [21](mock/21-loupe.png) | the working frame mid-step with a `loupe` open | the loupe hanging from rdi over the registers under it, its node framed; the minimap with the loupe at its place on the map, outlined bright | +| [21](mock/21-loupe.png) | the working frame mid-step with a `loupe` open | the loupe hanging from rdi over the registers under it, its node framed, the chain 1004090 → 1004070 → 1004050 as `arc`s in one lane (the view withholds them while the loupe is open); the minimap with the loupe at its place on the map, outlined bright | | [1](mock/01-fib-recursion.png) | first pass | `calls` at camera scale | | [2](mock/02-list-insert.png) | first pass | `nodes` at camera scale; `allocated` | | [3](mock/03-syscall-write.png) | first pass | `syscalls`; `kernel` | @@ -1250,11 +1303,15 @@ under [Token changes](#token-changes). moves one transform for the whole stage and `relayout` lerps boxes at one text size: neither does this. A sprint, a long run and a far `continue` are played on the map between a `surface` and a `dive`. -4. **The loupe** at the working frame's measures ([`loupe`](#loupe)): +4. **`arc`** ([`arc`](#arc)): in a dump, a loupe and the stack, the lanes + at their left edge, the columns moved for them; standing and full ink; + the frame chain only when touched; a loupe's rows withheld from a dump + showing them. +5. **The loupe** at the working frame's measures ([`loupe`](#loupe)): five rows, hanging from its pointer, the lift and the shadow; nine rows as a panel on the map; on the minimap a lift block, its target outlined. -5. **Still from before**: the calls tree's small size and folds, +6. **Still from before**: the calls tree's small size and folds, `metric.span.name_max` 300, `time.caption_max` 12 s and `time.first_step` 4 s (5 s when a scene opens on the map). @@ -1290,6 +1347,9 @@ is in the file, "Is" what the documents say. | `time.flash` | none | 0.20: a ring from 8 to 14 | | `time.caption_max`, `first_step` | none | 12.00; 4.00, 5.00 when a scene opens on the map | | `metric.span.name_max` | none | 300 | +| `metric.arc` | none | lanes 4, 10, 16 (a dump, a loupe), 4 and 10 (the stack); out at 21, head 7 by 8 at 22; rows left at 9 and entered at 15 going up; stroke 2, radius 4; standing at 60% toward the page | +| `metric.bytes.bracket`, `address`; `metric.slot.lane` | 7, 18; 10 | 24, 34 (the bytes 12 after the address, 132 at least); 16 | +| `time.arc` | none | `draw` 0.20 from s+6; `fade` 0.20; `quiet` 0.40 with the cool; `lane` 0.20 | | `metric.calls` small, folds | full only | disc 36, level 38, badge 24 at 6 and 32, mono 20; fold past 13 leaves or 6 levels | Unchanged and already there: the 1920 stage and its splits, the palette diff --git a/design/mock/09-context-480.png b/design/mock/09-context-480.png index 2a2f016..3e5996b 100644 Binary files a/design/mock/09-context-480.png and b/design/mock/09-context-480.png differ diff --git a/design/mock/09-context.png b/design/mock/09-context.png index f18173a..41cd918 100644 Binary files a/design/mock/09-context.png and b/design/mock/09-context.png differ diff --git a/design/mock/09-context.svg b/design/mock/09-context.svg index 3e0a7c5..4000a2d 100644 --- a/design/mock/09-context.svg +++ b/design/mock/09-context.svg @@ -263,8 +263,8 @@ stack eight words from rsp · the frames they belong to -rbp rsp - +rbp rsp + +0 saved rbp 7fffffffe @@ -351,11 +351,11 @@ its bytes the heap, 1004070 to 10040bf - - - -10040 -70 + + + +10040 +70 09 00 @@ -378,11 +378,11 @@ 1004050 - - - -10040 -80 + + + +10040 +80 00 00 00 @@ -400,11 +400,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -90 + + + +10040 +90 04 00 @@ -427,11 +427,11 @@ 1004070 - - - -10040 -a0 + + + +10040 +a0 00 00 00 @@ -449,11 +449,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -b0 + + + +10040 +b0 01 00 @@ -474,6 +474,8 @@ 00 00 NULL + + @@ -1185,8 +1187,8 @@ - - + + @@ -1204,8 +1206,8 @@ - - + + @@ -1226,8 +1228,8 @@ - - + + @@ -1245,8 +1247,8 @@ - - + + @@ -1267,8 +1269,8 @@ - - + + @@ -1286,8 +1288,8 @@ - - + + @@ -1308,8 +1310,8 @@ - - + + @@ -1327,8 +1329,8 @@ - - + + @@ -1349,8 +1351,8 @@ - - + + @@ -1368,8 +1370,8 @@ - - + + @@ -1390,8 +1392,8 @@ - - + + @@ -1409,8 +1411,8 @@ - - + + @@ -1431,8 +1433,8 @@ - - + + @@ -1450,7 +1452,7 @@ - + @@ -1577,7 +1579,7 @@ - + diff --git a/design/mock/10-context-step-480.png b/design/mock/10-context-step-480.png index c3eb3b9..57090bb 100644 Binary files a/design/mock/10-context-step-480.png and b/design/mock/10-context-step-480.png differ diff --git a/design/mock/10-context-step.png b/design/mock/10-context-step.png index 41ecdc4..fee3594 100644 Binary files a/design/mock/10-context-step.png and b/design/mock/10-context-step.png differ diff --git a/design/mock/10-context-step.svg b/design/mock/10-context-step.svg index 1b9db57..de52e22 100644 --- a/design/mock/10-context-step.svg +++ b/design/mock/10-context-step.svg @@ -264,8 +264,8 @@ stack eight words from rsp · the frames they belong to -rbp rsp - +rbp rsp + +0 saved rbp 7fffffffe @@ -352,11 +352,11 @@ its bytes the heap, 1004070 to 10040bf - - - -10040 -70 + + + +10040 +70 09 00 @@ -379,11 +379,11 @@ 1004050 - - - -10040 -80 + + + +10040 +80 00 00 00 @@ -401,11 +401,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -90 + + + +10040 +90 04 00 @@ -429,11 +429,11 @@ 1004070 - - - -10040 -a0 + + + +10040 +a0 00 00 00 @@ -451,11 +451,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -b0 + + + +10040 +b0 01 00 @@ -476,6 +476,8 @@ 00 00 NULL + + @@ -1197,8 +1199,8 @@ - - + + @@ -1216,8 +1218,8 @@ - - + + @@ -1238,8 +1240,8 @@ - - + + @@ -1257,8 +1259,8 @@ - - + + @@ -1279,8 +1281,8 @@ - - + + @@ -1298,8 +1300,8 @@ - - + + @@ -1320,8 +1322,8 @@ - - + + @@ -1339,8 +1341,8 @@ - - + + @@ -1361,8 +1363,8 @@ - - + + @@ -1380,8 +1382,8 @@ - - + + @@ -1402,8 +1404,8 @@ - - + + @@ -1421,8 +1423,8 @@ - - + + @@ -1443,8 +1445,8 @@ - - + + @@ -1462,7 +1464,7 @@ - + @@ -1589,7 +1591,7 @@ - + diff --git a/design/mock/11-context-lens-480.png b/design/mock/11-context-lens-480.png index 4c4a0f5..d4746ff 100644 Binary files a/design/mock/11-context-lens-480.png and b/design/mock/11-context-lens-480.png differ diff --git a/design/mock/11-context-lens.png b/design/mock/11-context-lens.png index e0b9122..631e45c 100644 Binary files a/design/mock/11-context-lens.png and b/design/mock/11-context-lens.png differ diff --git a/design/mock/11-context-lens.svg b/design/mock/11-context-lens.svg index d0d3bf3..eae34f3 100644 --- a/design/mock/11-context-lens.svg +++ b/design/mock/11-context-lens.svg @@ -250,8 +250,8 @@ stack six words from rsp · the frames they belong to -rbp rsp - +rbp rsp + +0 saved rbp 7fffffffe @@ -316,11 +316,11 @@ its bytes the heap, 1004050 to 10040bf - - - -10040 -50 + + + +10040 +50 10 00 @@ -343,11 +343,11 @@ 1004030 - - - -10040 -60 + + + +10040 +60 00 00 00 @@ -365,11 +365,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -70 + + + +10040 +70 09 00 @@ -392,11 +392,11 @@ 1004050 - - - -10040 -80 + + + +10040 +80 00 00 00 @@ -414,11 +414,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -90 + + + +10040 +90 04 00 @@ -442,11 +442,11 @@ 1004070 - - - -10040 -a0 + + + +10040 +a0 00 00 00 @@ -464,11 +464,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -b0 + + + +10040 +b0 01 00 @@ -489,6 +489,10 @@ 00 00 NULL + + + + @@ -1210,8 +1214,8 @@ - - + + @@ -1229,8 +1233,8 @@ - - + + @@ -1251,8 +1255,8 @@ - - + + @@ -1270,8 +1274,8 @@ - - + + @@ -1292,8 +1296,8 @@ - - + + @@ -1311,8 +1315,8 @@ - - + + @@ -1333,8 +1337,8 @@ - - + + @@ -1352,8 +1356,8 @@ - - + + @@ -1374,8 +1378,8 @@ - - + + @@ -1393,8 +1397,8 @@ - - + + @@ -1415,8 +1419,8 @@ - - + + @@ -1434,8 +1438,8 @@ - - + + @@ -1456,8 +1460,8 @@ - - + + @@ -1475,7 +1479,7 @@ - + @@ -1602,7 +1606,7 @@ - + diff --git a/design/mock/12-calls-subject-480.png b/design/mock/12-calls-subject-480.png index 935056a..2501db2 100644 Binary files a/design/mock/12-calls-subject-480.png and b/design/mock/12-calls-subject-480.png differ diff --git a/design/mock/12-calls-subject.png b/design/mock/12-calls-subject.png index 9583bf8..61f349d 100644 Binary files a/design/mock/12-calls-subject.png and b/design/mock/12-calls-subject.png differ diff --git a/design/mock/12-calls-subject.svg b/design/mock/12-calls-subject.svg index 32d6452..3fbf152 100644 --- a/design/mock/12-calls-subject.svg +++ b/design/mock/12-calls-subject.svg @@ -242,8 +242,8 @@ stack six words from rsp · the frames they belong to -rsp - +rsp + +0 7fffffffed 78 @@ -278,8 +278,8 @@ 7ffff7ffd000 vdso+0 -rbp - +rbp + +28 saved rbp 7fffffffed diff --git a/design/mock/13-sqlite-row-480.png b/design/mock/13-sqlite-row-480.png index 3674630..aacd128 100644 Binary files a/design/mock/13-sqlite-row-480.png and b/design/mock/13-sqlite-row-480.png differ diff --git a/design/mock/13-sqlite-row.png b/design/mock/13-sqlite-row.png index fe4dc79..3330d15 100644 Binary files a/design/mock/13-sqlite-row.png and b/design/mock/13-sqlite-row.png differ diff --git a/design/mock/13-sqlite-row.svg b/design/mock/13-sqlite-row.svg index 585a686..101dd32 100644 --- a/design/mock/13-sqlite-row.svg +++ b/design/mock/13-sqlite-row.svg @@ -233,8 +233,8 @@ stack six words from rsp · the frames they belong to -rbp rsp - +rbp rsp + +0 saved rbp 7fffffffe9 @@ -337,87 +337,87 @@ its bytes pX, the row: a BtreePayload, at rsi - - - -7fffffffea -60 - -00 -00 -00 -00 -00 -00 -00 -00 -NULL - - -01 -00 -00 -00 -00 -00 -00 -00 -1 - - - -7fffffffea -70 - -88 -4d -52 -00 -00 -00 -00 -00 - - -524d88 - -00 -00 -00 -00 -00 -00 -00 -00 -NULL - - - -7fffffffea -80 - -00 -00 -0 -00 -00 - - -07 -00 -00 -00 -7 - -00 -00 -00 -00 -0 -01 -00 -00 -00 + + + +7fffffffea +60 + +00 +00 +00 +00 +00 +00 +00 +00 +NULL + + +01 +00 +00 +00 +00 +00 +00 +00 +1 + + + +7fffffffea +70 + +88 +4d +52 +00 +00 +00 +00 +00 + + +524d88 + +00 +00 +00 +00 +00 +00 +00 +00 +NULL + + + +7fffffffea +80 + +00 +00 +0 +00 +00 + + +07 +00 +00 +00 +7 + +00 +00 +00 +00 +0 +01 +00 +00 +00 moment 9 of 58 diff --git a/design/mock/14-sqlite-page-480.png b/design/mock/14-sqlite-page-480.png index 6d2f4f6..aed0f9e 100644 Binary files a/design/mock/14-sqlite-page-480.png and b/design/mock/14-sqlite-page-480.png differ diff --git a/design/mock/14-sqlite-page.png b/design/mock/14-sqlite-page.png index fb70150..40739fd 100644 Binary files a/design/mock/14-sqlite-page.png and b/design/mock/14-sqlite-page.png differ diff --git a/design/mock/14-sqlite-page.svg b/design/mock/14-sqlite-page.svg index 6c81055..c22705b 100644 --- a/design/mock/14-sqlite-page.svg +++ b/design/mock/14-sqlite-page.svg @@ -299,8 +299,8 @@ 2 -rbp - +rbp + +40 saved rbp 7fffffffe7 @@ -445,11 +445,11 @@ its bytes pBuf: page 2 of t.db, at rsi - - - -53 -8b28 + + + +53 +8b28 0d @@ -487,17 +487,17 @@ 4070 00 00 - - - - + + -253 rows - - - -53 -9b08 + + +253 rows + + + +53 +9b08 00 00 00 @@ -521,11 +521,11 @@ "gamma" 06 - - - -53 -9b18 + + + +53 +9b18 02 2 diff --git a/design/mock/15-marks-480.png b/design/mock/15-marks-480.png index ad7f92c..3dca0af 100644 Binary files a/design/mock/15-marks-480.png and b/design/mock/15-marks-480.png differ diff --git a/design/mock/15-marks.png b/design/mock/15-marks.png index a295ec1..5a68341 100644 Binary files a/design/mock/15-marks.png and b/design/mock/15-marks.png differ diff --git a/design/mock/15-marks.svg b/design/mock/15-marks.svg index 32d55db..2c44a39 100644 --- a/design/mock/15-marks.svg +++ b/design/mock/15-marks.svg @@ -167,11 +167,11 @@ its bytes moment 4: the store, struck; 10040b8, held - - - -10040 -80 + + + +10040 +80 00 00 00 @@ -189,11 +189,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -90 + + + +10040 +90 04 00 @@ -216,11 +216,11 @@ 10040b0 - - - -10040 -a0 + + + +10040 +a0 00 00 00 @@ -238,11 +238,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -b0 + + + +10040 +b0 01 00 @@ -263,6 +263,8 @@ 00 00 NULL + + b0 @@ -506,11 +508,11 @@ its bytes moment 4: the store, struck; 10040b8, held - - - -10040 -80 + + + +10040 +80 00 00 00 @@ -528,11 +530,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -90 + + + +10040 +90 04 00 @@ -555,11 +557,11 @@ 10040b0 - - - -10040 -a0 + + + +10040 +a0 00 00 00 @@ -577,11 +579,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -b0 + + + +10040 +b0 01 00 @@ -602,6 +604,8 @@ 00 00 NULL + + b0 @@ -846,11 +850,11 @@ its bytes moment 4: the store, struck; 10040b8, held - - - -10040 -80 + + + +10040 +80 00 00 00 @@ -868,11 +872,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -90 + + + +10040 +90 04 00 @@ -895,11 +899,11 @@ 10040b0 - - - -10040 -a0 + + + +10040 +a0 00 00 00 @@ -917,11 +921,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -b0 + + + +10040 +b0 01 00 @@ -942,6 +946,8 @@ 00 00 NULL + + b0 diff --git a/design/mock/19-map-1080.png b/design/mock/19-map-1080.png index e6e6d0e..3f8ed45 100644 Binary files a/design/mock/19-map-1080.png and b/design/mock/19-map-1080.png differ diff --git a/design/mock/19-map-480.png b/design/mock/19-map-480.png index 7ba1436..5c08c28 100644 Binary files a/design/mock/19-map-480.png and b/design/mock/19-map-480.png differ diff --git a/design/mock/19-map.png b/design/mock/19-map.png index f4c5dc3..b9313a6 100644 Binary files a/design/mock/19-map.png and b/design/mock/19-map.png differ diff --git a/design/mock/19-map.svg b/design/mock/19-map.svg index 81216ee..cd2def6 100644 --- a/design/mock/19-map.svg +++ b/design/mock/19-map.svg @@ -719,11 +719,11 @@ memory the heap, round what the step reads - - - -10040 -00 + + + +10040 +00 00 00 00 @@ -741,11 +741,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -10 + + + +10040 +10 24 00 @@ -766,11 +766,11 @@ 00 00 NULL - - - -10040 -20 + + + +10040 +20 00 00 00 @@ -788,11 +788,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -30 + + + +10040 +30 19 00 @@ -815,11 +815,11 @@ 1004010 - - - -10040 -40 + + + +10040 +40 00 00 00 @@ -837,11 +837,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -50 + + + +10040 +50 10 00 @@ -864,11 +864,11 @@ 1004030 - - - -10040 -60 + + + +10040 +60 00 00 00 @@ -886,11 +886,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -70 + + + +10040 +70 09 00 @@ -913,11 +913,11 @@ 1004050 - - - -10040 -80 + + + +10040 +80 00 00 00 @@ -935,11 +935,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -90 + + + +10040 +90 04 00 @@ -963,11 +963,11 @@ 1004070 - - - -10040 -a0 + + + +10040 +a0 00 00 00 @@ -985,11 +985,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -b0 + + + +10040 +b0 01 00 @@ -1010,11 +1010,11 @@ 00 00 NULL - - - -10040 -c0 + + + +10040 +c0 00 00 00 @@ -1032,12 +1032,20 @@ 00 00 malloc's: the top chunk - - - - + + -19 rows + + +19 rows + + + + + + + + @@ -1159,11 +1167,11 @@ → 1004070 heap · struct node, 16 bytes - - - -10040 -30 + + + +10040 +30 19 00 @@ -1186,11 +1194,11 @@ 1004010 - - - -10040 -40 + + + +10040 +40 00 00 00 @@ -1208,11 +1216,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -50 + + + +10040 +50 10 00 @@ -1235,11 +1243,11 @@ 1004030 - - - -10040 -60 + + + +10040 +60 00 00 00 @@ -1257,11 +1265,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -70 + + + +10040 +70 09 @@ -1286,11 +1294,11 @@ 1004050 - - - -10040 -80 + + + +10040 +80 00 00 00 @@ -1308,11 +1316,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -90 + + + +10040 +90 04 00 @@ -1335,11 +1343,11 @@ 1004070 - - - -10040 -a0 + + + +10040 +a0 00 00 00 @@ -1357,11 +1365,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -b0 + + + +10040 +b0 01 00 @@ -1382,6 +1390,12 @@ 00 00 NULL + + + + + + @@ -1435,8 +1449,8 @@ -8 7fffffffecd8 7ffff7ffd000 -rbp rsp - +rbp rsp + +0 saved rbp 7fffffffe @@ -1834,6 +1848,10 @@ 6 + + + + diff --git a/design/mock/21-loupe-480.png b/design/mock/21-loupe-480.png index 7c109c3..4f9f28e 100644 Binary files a/design/mock/21-loupe-480.png and b/design/mock/21-loupe-480.png differ diff --git a/design/mock/21-loupe.png b/design/mock/21-loupe.png index d22fe69..56c85d7 100644 Binary files a/design/mock/21-loupe.png and b/design/mock/21-loupe.png differ diff --git a/design/mock/21-loupe.svg b/design/mock/21-loupe.svg index 9e5f457..8108808 100644 --- a/design/mock/21-loupe.svg +++ b/design/mock/21-loupe.svg @@ -264,8 +264,8 @@ stack eight words from rsp · the frames they belong to -rbp rsp - +rbp rsp + +0 saved rbp 7fffffffe @@ -352,11 +352,11 @@ its bytes the heap, 1004070 to 10040bf - - - -10040 -70 + + + +10040 +70 09 00 @@ -379,11 +379,11 @@ 1004050 - - - -10040 -80 + + + +10040 +80 00 00 00 @@ -401,11 +401,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -90 + + + +10040 +90 04 00 @@ -429,11 +429,11 @@ 1004070 - - - -10040 -a0 + + + +10040 +a0 00 00 00 @@ -451,11 +451,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -b0 + + + +10040 +b0 01 00 @@ -544,11 +544,11 @@ → 1004070 heap · struct node, 16 bytes - - - -10040 -50 + + + +10040 +50 10 00 @@ -571,11 +571,11 @@ 1004030 - - - -10040 -60 + + + +10040 +60 00 00 00 @@ -593,11 +593,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -70 + + + +10040 +70 09 @@ -622,11 +622,11 @@ 1004050 - - - -10040 -80 + + + +10040 +80 00 00 00 @@ -644,11 +644,11 @@ 00 00 malloc's: a chunk of 32 - - - -10040 -90 + + + +10040 +90 04 00 @@ -671,6 +671,10 @@ 1004070 + + + + @@ -1326,8 +1330,8 @@ - - + + @@ -1345,8 +1349,8 @@ - - + + @@ -1367,8 +1371,8 @@ - - + + @@ -1386,8 +1390,8 @@ - - + + @@ -1408,8 +1412,8 @@ - - + + @@ -1427,8 +1431,8 @@ - - + + @@ -1449,8 +1453,8 @@ - - + + @@ -1468,8 +1472,8 @@ - - + + @@ -1490,8 +1494,8 @@ - - + + @@ -1509,8 +1513,8 @@ - - + + @@ -1531,8 +1535,8 @@ - - + + @@ -1550,8 +1554,8 @@ - - + + @@ -1572,8 +1576,8 @@ - - + + @@ -1591,7 +1595,7 @@ - + @@ -1673,8 +1677,8 @@ - - + + @@ -1695,8 +1699,8 @@ - - + + @@ -1714,8 +1718,8 @@ - - + + @@ -1736,8 +1740,8 @@ - - + + @@ -1755,8 +1759,8 @@ - - + + @@ -1777,8 +1781,8 @@ - - + + @@ -1796,8 +1800,8 @@ - - + + @@ -1818,8 +1822,8 @@ - - + + @@ -1837,8 +1841,8 @@ - - + + @@ -1911,7 +1915,7 @@ - + diff --git a/design/mock/context.py b/design/mock/context.py index 069e894..8c99956 100644 --- a/design/mock/context.py +++ b/design/mock/context.py @@ -253,6 +253,41 @@ def pin_up(g, cx, y, names, ink, size, link=None, sw=3): g.t(cx + 9, by, " ".join(names[1:]), size, VELLUM, face) +def arcs(g, x, found, rows_y, lanes, touched=(), align=16): + """`arc`: for each (source row, field address, target address, ink), a pointer whose target row is in this + panel: from the source row's left, along a lane at x + lanes[k], to the target row's address, head first. Going + up it leaves its row at 9 and arrives at 15 (going down, 15 and 9), so a chain shares a lane; nested spans + take inner lanes, the longest outermost. Standing ones quiet (60% toward the page); those the step touches + full. A target out of the window, touched: a stub to the panel's rule. Returns how many were not drawn.""" + items = [] + for src, field, tgt, ink, edge in found: + ys = rows_y[src] + yt = rows_y.get(tgt - tgt % align) + if yt is None: + if field in touched and edge is not None: # out of the window: a stub, only for the step's pointer + up = edge < ys + items.append((abs(ys - edge), ys + (9 if up else 15), edge, ink, True, True)) + continue + up = yt < ys + items.append((abs(ys - yt), ys + (9 if up else 15), yt + (15 if up else 9), ink, field in touched, False)) + items.sort(key=lambda it: -it[0]) + taken, dropped = [[] for _ in lanes], 0 + for span, y0, y1, ink, hot, stub in items: + lo, hi = min(y0, y1), max(y0, y1) + k = next((k for k in range(len(lanes)) if all(hi < a or lo > z for a, z in taken[k])), None) + if k is None: + dropped += 1 + continue + taken[k].append((lo, hi)) + lx = x + lanes[k] + col = ink if hot else mix(ink, PAGE, 0.4) + if stub: + gen.arrow(g, [(x + 21, y0), (lx, y0), (lx, y1)], col, 2, r=4, hl=7, hw=8) + else: # from the row's left, to the row's left: the brackets and addresses untouched + gen.arrow(g, [(x + 21, y0), (lx, y0), (lx, y1), (x + 22, y1)], col, 2, r=4, hl=7, hw=8) + return dropped + + def bracket(g, x, y0, y1, ink, sw=2, serif=5, side=1): """A span of rows, marked at its edge: the end of a projection, or a thing that is a view of another.""" g.rect(x - sw / 2, y0, sw, y1 - y0, ink) @@ -297,7 +332,7 @@ def registers(g, y, regs, flags, marks): return where -def stack(g, y, rows, frames, note=None, rsp=None, roles=None): +def stack(g, y, rows, frames, note=None, rsp=None, roles=None, touched=(), chain_too=False): """rows: (slot, pins, links, end[, marks]). frames: (name, first row, last row), newest first: the backtrace, drawn on the words that are each frame; a first row under 0 runs above the window. The window is the newest frame's. A frame's name is never cut for a chain: the chains on the rows it sits on end 12 @@ -328,7 +363,7 @@ def stack(g, y, rows, frames, note=None, rsp=None, roles=None): yy = y0 + i * ROW ys.append(yy) if pins: - pin(g, RX + 10, yy, pins, STACK) + pin(g, RX + 16, yy, pins, STACK) if rsp is not None: # the offset from rsp, pwndbg's way: +18 off = slot - rsp g.t(RX + 172, b(yy), ("+%x" % off) if off >= 0 else ("-%x" % -off), S, FAINT, MONO, "end") @@ -342,6 +377,20 @@ def stack(g, y, rows, frames, note=None, rsp=None, roles=None): g.t(end_x, b(yy), text, S, ink, MONO, "end") end_x -= len(text) * A + 12 chain(g, first, yy, [(slot, STACK)] + links, end, marks[0] if marks else None, room=end_x, lead=lead) + # the arcs: a word holding the address of a slot in the window. The frame chain (a saved rbp) is the spans' + # already, and is drawn only when the step touches it. + slots = {r[0]: ys[i] for i, r in enumerate(rows)} + found = [] + for i, (slot, pins, links, end, *marks) in enumerate(rows): + if marks and marks[0].get("free") or not links: + continue + v = links[0][0] + is_chain = roles.get(i, ("",))[0] == "saved rbp" + if links[0][1] == STACK and (not is_chain or slot in touched or chain_too): + edge = y + TAG + 1 if v < rows[0][0] else ys[-1] + ROW + PAD - 1 + found.append((slot, slot, v, STACK, edge)) + arcs(g, RX, [(s0, f, t, ink, e) for s0, f, t, ink, e in found if t in slots or f in touched], slots, (4, 10), touched, + align=8) for i, name, x, ya, yb, ny, open_top, open_ in spans: ink = GOLD if i == 0 else RULE g.rect(x - 1, ya, 2, yb - ya, ink) @@ -468,7 +517,7 @@ def thread(g, ys, spans): # ---- the lens: a list, and beside it the bytes it is drawn from ------------------------- def fields(g, y, h, about, base, length, flist, mem, region, region_of, marks=(), title="its bytes", x=None, - framed=(), bare=False, rows_shown=None, more_rows=True): + framed=(), bare=False, rows_shown=None, more_rows=True, touched=(), withhold=None, hot=False): """`hexdump` by `fields`: the region a scene names, read by the fields it gives it, in the band's view. flist: (at, len, reads, big, mark) with reads in number | pointer | text | bytes. mem: {address: byte} of what the stop shown saw (or the kernel took); a byte not in it is unread. marks: the field marks framed as read. @@ -485,20 +534,21 @@ def fields(g, y, h, about, base, length, flist, mem, region, region_of, marks=() shown = rows_shown if rows_shown is not None else [r for r in range(total) if holds(r)] ys = {} digits = max(len("%x" % (base + 16 * r)) for r in shown) - shift = max(18 + digits * A + 12 - 132, 0) + shift = max(34 + digits * A + 12 - 132, 0) + found = [] bx = lambda i: X + 132 + shift + i * 30 + (12 if i >= 8 else 0) lead = shared([base + 16 * r for r in shown]) if len(shown) > 1 else 0 yy, last = y + TAG + PAD, None for r in shown: if last is not None and r > last + 1: # the rows left out: one row, and how many - more(g, X + 18 - 6, yy) - g.t(X + 18 + 30 + 36, b(yy), "%d rows" % (r - last - 1), S, FAINT, MONO) + more(g, X + 34 - 6, yy) + g.t(X + 34 + 30 + 36, b(yy), "%d rows" % (r - last - 1), S, FAINT, MONO) yy += ROW last = r a0 = base + 16 * r ys[a0] = yy - bracket(g, X + 7, yy + 3, yy + ROW - 3, mix(region, PAGE, 0.6)) - addr(g, X + 18, yy, a0, region, lead=lead) + bracket(g, X + 24, yy + 3, yy + ROW - 3, mix(region, PAGE, 0.6)) + addr(g, X + 34, yy, a0, region, lead=lead) runs, i = [], 0 while i < 16 and a0 + i < base + length: f = next((f for f in flist if base + f[0] <= a0 + i < base + f[0] + f[1]), None) @@ -544,6 +594,8 @@ def fields(g, y, h, about, base, length, flist, mem, region, region_of, marks=() g.t(x, b(yy) - 1, note, 18, FAINT, "sans") x += tw(note, 18, "sans") + A continue + if reads == "pointer" and word and base <= word < base + length: # a row of this panel: an arc too + found.append((a0, a0 + i0, word, region_of(word) or VELLUM, None)) if reads == "pointer": if word == 0: s_, sink = "NULL", DIM @@ -560,8 +612,12 @@ def fields(g, y, h, about, base, length, flist, mem, region, region_of, marks=() x += (len(s_) + 1) * A yy += ROW if more_rows and shown and shown[-1] < total - 1: # the rows after the last field: one row, and how many - more(g, X + 18 - 6, yy) - g.t(X + 18 + 30 + 36, b(yy), "%d rows" % (total - 1 - shown[-1]), S, FAINT, MONO) + more(g, X + 34 - 6, yy) + g.t(X + 34 + 30 + 36, b(yy), "%d rows" % (total - 1 - shown[-1]), S, FAINT, MONO) + top, foot = y + TAG + 1, yy + (ROW if more_rows and shown and shown[-1] < total - 1 else 0) + PAD - 1 + found = [(s0, f, t, ink, top if t < base + 16 * shown[0] else foot) for s0, f, t, ink, _ in found + if not (withhold and withhold[0] <= s0 < withhold[1] and withhold[0] <= t < withhold[1])] # a loupe has them + arcs(g, X, found, ys, (4, 10, 16), {f for _, f, _, _, _ in found} if hot else touched) # a loupe: all at full ink return ys diff --git a/design/mock/dense.py b/design/mock/dense.py index 4017d69..ce65d95 100644 --- a/design/mock/dense.py +++ b/design/mock/dense.py @@ -271,7 +271,7 @@ def loupe(g, x, y, title, note, base, flist, framed, depth, rows=9): xx += len(s_) * A g.t(x + CW - 10, y + 18, note, 18, DIM, "sans", "end") return C.fields(g, y, h, "", base, 16 * rows, flist, MEM, HEAP, region, framed=framed, bare=True, x=x, - more_rows=False) + more_rows=False, hot=True) def stem(g, pts): diff --git a/design/mock/map.py b/design/mock/map.py index 84e42fa..8e91ffa 100644 --- a/design/mock/map.py +++ b/design/mock/map.py @@ -115,7 +115,7 @@ def draw_map(g, step, loupe, subject=False): D.put(col[2]) mem = C.fields(g, 96, ph(14), "the heap, round what the step reads", 0x1004000, 512, D.heap_fields(0x1004000, 512, 0x1004098), D.MEM, HEAP, D.region, marks=(9,) if step else (), - title="memory") + title="memory", touched={0x1004098} if step else ()) win["view"] = (col[2], mem[0x1004050 if subject else 0x1004070], D.CW, (7 if subject else 5) * ROW) C.registers(g, 476, D.regs(step), D.FLAGS, {"rax": {0: "tick"}, "rcx": {0: "tick"}, "rdi": {0: "strike" if step else "tick"}}) @@ -212,7 +212,7 @@ def clock(g, moment, total): g.t(MINI[0] - 16, 934, "moment %d of %d" % (moment, total), S, FAINT, MONO, "end") -def working_panels(g, step, subject, wrap=lambda name: ("", "")): +def working_panels(g, step, subject, wrap=lambda name: ("", ""), withhold=None): """The working frame's panels, each between the strings wrap(name) gives (a transform, for the dive).""" stage(False) sp = C.SUBJECT if subject else C.BESIDE @@ -245,7 +245,8 @@ def working_panels(g, step, subject, wrap=lambda name: ("", "")): c = open_("view") view = C.fields(g, 48, sp["view"], "the heap, %x to %x" % (0x1004000 + 16 * (SUBJECT_VIEW if subject else BESIDE_VIEW)[0], 0x10040bf), 0x1004000, 512, D.heap_fields(0x1004000, 512, 0x1004098), D.MEM, HEAP, D.region, - marks=(9,) if step else (), rows_shown=SUBJECT_VIEW if subject else BESIDE_VIEW, more_rows=False) + marks=(9,) if step else (), rows_shown=SUBJECT_VIEW if subject else BESIDE_VIEW, more_rows=False, + touched={0x1004098} if step else (), withhold=withhold) g.o.append(c) if c else None out["view"] = view return out, sp @@ -256,7 +257,7 @@ def working(name, step, subject=False, loupe=False, caption=None): m, win = map_log(step, loupe, subject) stage(False) g = Svg() - out, sp = working_panels(g, step, subject) + out, sp = working_panels(g, step, subject, withhold=(0x1004050, 0x10040a0) if loupe else None) D.put(64) C.thread(g, out["thread"][0], [(out["thread"][1], out["thread"][1] + ROW)]) D.put(64) diff --git a/design/motion.md b/design/motion.md index 44f4b6f..56a35bc 100644 --- a/design/motion.md +++ b/design/motion.md @@ -530,6 +530,23 @@ The levels are the cascade's; what is in them is not one write each. A dozen registers struck on one frame is a flash that says only "a lot"; the wave says it in about 0.6 s and lets the eye run down the panel with it. +### A pointer written in a panel of rows + +`n->next = head` where both nodes are rows of the dump: the bytes and the +[`arc`](README.md#arc) between their rows are one event, the bytes first. + +| Frames | | +| --- | --- | +| s−12 to s | the arm on the word's bytes; the old arc, if its target was on screen, goes dashed | +| s | the strike on the bytes that changed | +| s+6 to s+18 | the old arc fades; the new one draws from the word's row along its lane to the target's row, head first, `standard`, full ink | +| the advance to +24 | with the cool, the arc quiets to its standing ink | + +A pointer only read (`cur->next`) brings its arc to full ink with the read +(6 f) and back with the advance. Where the new target is off the panel, the +old arc fades and nothing replaces it, or a stub to the panel's rule if the +target is in the same region but out of the window. + ### A pointer opened A `loupe`, on a beat the caption names: `rdi` has just taken the next -- cgit v1.3