debugger: lldb formatters for a native build (step 3 of #42) #600
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Step 3 of #42 (epic: debug native programs, DEBUGGER.md section 4). Step 2 (#469, PR #471, merged 2026-10-24) writes the layout table next to a
torb build --debugbinary and ships the gdb pretty printers (tools/gdb/torb_printers.py, gatetools/debug-values.sh). lldb still shows the raw C structs.Source
DEBUGGER.md sections 4, 11 and 18
Goal
A
torb build --debugbinary in an lldb session shows aString,List,Map,Setand the program's own records and cases the same way the gdb printers do, read from the same layout table.Acceptance criteria
tools/lldb/torb_formatters.py(lldb Python, loaded bycommand script import; no auto-load into the binary) registers summary and synthetic-children providers fortorb_text,torb_list,torb_map,torb_setand the table's records and cases, with the same output text, the same cut-offs (1000 characters, ten items,List(n)beyond) and the same<none>for a null storage pointer as the gdb printerstools/debug-values.sh) runs the sametests/debug-values/fixture underlldb --batchand compares the locals with the same expected text as gdb; wherelldb(with Python) is not installed it skips with a message, as for gdb. The measured result (islldbon the CI runner image) goes into the PR bodydocs/tooling/mentions the scriptSeed
Adds a script and gate lines; no syntax, native, driver flag or looked-up std name changes. No seed refresh needed. A refresh would stay Torben's.
Size
One PR, two Conventional Commits:
feat(debugger): lldb formatters for the layout table,test(debugger): run the value gate under lldb and document it.Dependencies
After #469 (landed). Part of #42. Remaining after this step:
torb debugfor a native program, then docs and editor launch.[loop:torbscript] claim implement by session:loop-torbscript-20261029-0858 until 2026-10-29T23:10:00Z
[loop:torbscript] release implement: the worker was interrupted by a gateway restart after pushing
de1874e9to PR #601 (no release comment of its own). CI onde1874e9decides: green goes to the merge gate, red gets a fix worker. next: waiting (CI on PR #601)[loop:torbscript] claim implement by session:loop-torbscript-20261030 until 2026-10-30T05:50:00Z (fix worker on PR #601: tier B red on
5ea3a2a0, review findings 555/566 and the PR body measurement)[loop:torbscript] release implement: fix worker pushed
43fbc42eto PR #601 (lldb formatter unwraps trait-typed boxed values; tier B on5ea3a2a0matched 6 of 8 bindings, List and Map showed the raw object). CI for43fbc42eis queued. next: waiting (CI on PR #601); green: PR body gets the measured tier B line, then the merge gate; red: one more fix from the new diagnostics; still not run: downgrade DEBUGGER.md slice 9 to 'Built, not yet run in CI'.[loop:torbscript] claim implement by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T06:00Z (third fix: tier B on
43fbc42ematched 6 of 8 bindings; List(Point) shows the ArrayList record and Map shows [:])[loop:torbscript] release: fix pushed to PR #601 as
1daffa9a(formatters read C members through the non-synthetic value; ArrayList records shown as their window; debug-values.sh prints torb-diagnose for differing bindings). Untested locally (no lldb here). Next: tier B on1daffa9a; green goes to Argus with the measured line.[loop:torbscript] claim implement by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T09:30:00Z (fourth fix: tier B on
1daffa9afails with UnboundLocalError 'raw' in text_of, torb_formatters.py line 388; the other bindings print correctly)[loop:torbscript] release fix: PR #601 is green at head
ab5838bd(CI run 2452, tier B with DEBUG_VALUES_REQUIRE=lldb passed, so all 8 bindings match expected.txt). The fix renamed the local raw that shadowed raw() in text_of, plus a second shadow in type_of, and added tools/lldb/check_shadowing.py. Argus is requested as reviewer.next: waiting (review of PR #601)