From 4f31aaef1338b53195f8c475db5a72d75cc1fc82 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 13 Nov 2026 12:18:26 -0300 Subject: debugger: add refractive lenses and configurable memory values Use disassembly lenses for executable pointers, browse surrounding segment context, and keep the reading surface opaque with GPU refraction at the edges. Route right-clicks by stack mapping and expose byte-width and numeric-format controls. Replace matching-address arrows with staggered shared-renderer highlights. Verified GUI and renderer suites, native restart/zoom cycles, independent float-extrema and popup review, and a live wrong-map stop at Deoptimizer::New with JS origin context. Requires Sketchbook 409c1ac. --- gui/README.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'gui/README.md') diff --git a/gui/README.md b/gui/README.md index b01c1aa..b355665 100644 --- a/gui/README.md +++ b/gui/README.md @@ -14,7 +14,8 @@ zig build run -Doptimize=ReleaseFast -- --fresh ``` Use the repository's Zig toolchain and existing sibling `sketchbook` and `pardes` -checkouts. Keep the installed `ztrace` beside `ztrace-gui`. +checkouts (Sketchbook `409c1ac` or newer for native backdrop filtering). Keep the +installed `ztrace` beside `ztrace-gui`. ## Controls @@ -36,6 +37,8 @@ goto memory 0x12345678 source-map /remote/build/source /local/source symbols /tmp/current-jit-object.o origin 0x12345678 +lens 0x12345678 +memory-format 8 hex ``` `break` accepts function, file:line and `*address` forms. `origin` retains the @@ -82,8 +85,23 @@ when supplied by recorded code, symbols or a known entry point. Click an address to open a connected lens. Further pointers keep their ancestors; a different pointer in a parent replaces its descendants. Each close button closes that lens and its children. Cycles, unreadable addresses and uncaptured historical -bytes are labeled. Long chains scroll within the overlay. Right-click routes an -address to disassembly, stack telescope or memory according to its mapping/value. +bytes are labeled. Executable mappings open disassembly lenses. Wheel over a +lens body to browse its segment; the original focus area stays bright while +surrounding rows dim. Shift-wheel, headers and gaps scroll the lens chain. +Right-click sends stack addresses to the stack pane and every other address to +memory. Matching addresses get staggered background highlights: the selected +occurrence appears first, followed by its peers. Lens ancestry keeps its connectors. + +Memory's two header controls choose 8/16/32/64-bit groups and hexadecimal, +unsigned, signed or floating-point values (little endian). `memory-format SIZE +FORMAT` sets byte sizes 1/2/4/8 and `hex`, `unsigned`, `signed` or `float` directly; +floats require 4 or 8 bytes. Unknown bytes stay unknown; these controls only +change rendering. Wide values remain reachable with Shift-h/l. + +Lenses keep an opaque reading surface, with a native GPU backdrop shader for +edge refraction, subtle color separation and a cyan rim. A canvas-sized texture and one reusable lens snapshot +are independent of font zoom and lens count. Non-GPU rendering keeps an opaque +fallback. `set glass false` in the renderer console disables the effect. The graph uses recorded basic blocks and shared graph layout. It is scoped to captured code, not a complete static analysis of an entire executable. Gold marks -- cgit v1.3