From f8740f6996eefc235af066a6686f52847c158a6b Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 14:12:42 -0300 Subject: design, revision 2: the whole context in every frame, a lens beside it The user's premise: show what pwndbg shows, hide nothing; the semantic views stay as a lens on the machine. So every frame holds the registers (all, each followed as a pointer), the stack telescope and the backtrace in a column that never changes, and the source, the disassembly and the scene's lens in the other. A value's ink says where it points (stack, heap, code, data; rwx underlined), its paper says what happened to it. JetBrains Mono NL for everything mono; the floor is mono 20, which a phone does not read: what narration depends on is also in the caption. Mocks 9 to 11 are drawn from a real recording of targets/list. --- design/mock/09-context.svg | 536 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 536 insertions(+) create mode 100644 design/mock/09-context.svg (limited to 'design/mock/09-context.svg') diff --git a/design/mock/09-context.svg b/design/mock/09-context.svg new file mode 100644 index 0000000..9dbecb2 --- /dev/null +++ b/design/mock/09-context.svg @@ -0,0 +1,536 @@ + + + + + + +the list +each node, and under it the heap words that are that node + +1 + + + +28b4 +10b0 + + +rcx + +4 + + + + +28b4 +1090 + + +rax + + +rdi + +9 + + + + +28b4 +1070 + +16 + + + + +28b4 +1050 + +25 + + + + +28b4 +1030 + +36 + + +28b4 +1010 +address +value +next +the heap, sixteen bytes a node +28b4 +1010 +0x24 +36 +0 +NULL +28b4 +1030 +0x19 +25 +28b4 +1010 +28b4 +1050 +0x10 +16 +28b4 +1030 +28b4 +1070 +9 +28b4 +1050 + + +rax + + +rdi +28b4 +1090 +4 +28b4 +1070 + + +rcx +28b4 +10b0 +1 + +0 +NULL + + + +list.c +lines 15 to 26 of 42 +15 +return +n +; +16 +} +17 +18 +__attribute__ +( +( +noinline +) +) +static +struct +node +* +reverse +( +struct +node +… +19 +struct +node +* +prev += +NULL +; + +20 +while +( +head +) +{ + + +21 +struct +node +* +next += +head +- +> +next +; + +22 +head +- +> +next += +prev +; +23 +prev += +head +; +24 +head += +next +; +25 +} +26 +return +prev +; + + + +disassembly +reverse + +100 +1920 ++16 +mov +rcx, rax + +100 +1923 ++19 +mov +rax, rdi + + + +100 +1926 ++22 +mov +rdi, qword ptr [rdi + 8] + +rdi + 8 = +28b4 +1098 + + +28b4 +1070 + + +9 +100 +192a ++26 +mov +qword ptr [rax + 8], rcx +100 +192e ++30 +test +rdi, rdi + + + +registers +stack +heap +code +data +rwx + +read-only +rax + +28b4 +1090 + + +4 +rbx +0 +rcx + +28b4 +10b0 + + +1 +rdx +0 +rsi +28b4 +10c0 + + +0 +rdi + +28b4 +1090 + + +4 +rbp +7ffe +970f +17b0 + + +7ffe +970f +17d0 + + +7ffe +970f +1880 + + +7ffe +970f +18e0 + + +0 +rsp +7ffe +970f +17b0 + + +7ffe +970f +17d0 + + +7ffe +970f +1880 + + +7ffe +970f +18e0 + + +0 +r8 +7f2b +a301 +9ac0 + + +0 +r9 +0x20 +32 +r10 +0x10 +16 +r11 +7f2b +a301 +9ac8 + + +28b4 +10c0 + + +0 +r12 +7ffe +970f +1908 + + +7ffe +970f +2fce + + +"zig-out/targets/list" +r13 +1 +r14 +7f2b +a32a +c000 + + +7f2b +a32a +d3c0 + + +0 +r15 +100 +29c0 + + +1 + + +rip +100 +1926 +reverse+22 +flags +0x206 +cf + +PF +af + +zf +sf + +IF +df +of + + + +stack +eight words from rsp · low addresses on top + + +rsp + + +rbp +7ffe +970f +17b0 + + +7ffe +970f +17d0 + + +7ffe +970f +1880 + + +7ffe +970f +18e0 + + +0 +7ffe +970f +17b8 + + +100 +18b0 +main+80 +return address +7ffe +970f +17c0 + + +7f2b +a302 +0de8 + + +7ffe +970f +1918 + + + + + +7ffe +970f +17c8 + + +0 +7ffe +970f +17d0 + + +7ffe +970f +1880 + + +7ffe +970f +18e0 + + +0 +main's saved rbp +7ffe +970f +17d8 + + +7f2b +a2e2 +7781 +libc+27781 +return address +7ffe +970f +17e0 + + +7f2b +a328 +fc60 +ld.so+22c60 +7ffe +970f +17e8 + + +7ffe +970f +1908 + + +7ffe +970f +2fce + + +"zig-out/targets… + + + +backtrace +newest on top + + +#0 +reverse+22 +list.c:21 +#1 +main+80 +list.c:39 +#2 +libc+27781 +libc.so.6 + + +moment 71 of 95 +Stopped in reverse, about to load head->next. +rdi holds a node's address; the word after its value is the next node. + -- cgit v1.3