feat(debugger): lldb formatters for the layout table #601

Merged
argus merged 5 commits from loop/600-lldb-formatters into main 2026-10-30 07:01:23 +00:00
Collaborator

Closes #600

Step 3 of #42: the lldb side of the native value display, over the unchanged layout table of step 2.

  • tools/lldb/torb_formatters.py (loaded by command script import, never from the binary): summaries and synthetic children for torb_text, torb_list, torb_map, torb_set and the table's records and cases (same text, cut-offs of 1000 characters and ten items, <none> for a null storage pointer), plus torb-print, torb-locals, torb-layouts like the gdb script.
  • tools/debug-values.sh runs the same tests/debug-values/ fixture under lldb --batch against the same expected.txt; skips with a message where lldb or its Python is missing or off Linux.
  • DEBUGGER.md sections 4, 11, 18 (slice 9, Done) and 19; docs/tooling/torb-build.md and its skills/ copy.

No syntax, native, driver flag or std name changes; no seed refresh. Layout table format and emitter untouched.

Test. The tier B gate tools/debug-values.sh in forge CI, with lldb installed and DEBUG_VALUES_REQUIRE: lldb.

Measured (head ab5838bd, run 2452, job tier B (linux-x64): success). tools/debug-values.sh ran with lldb installed and DEBUG_VALUES_REQUIRE: lldb, so a skip would have failed the job; the gate compares the lldb output to tests/debug-values/expected.txt with cmp, so all 8 of 8 bindings matched exactly (origin, points, count, ready, title, shape, tags, ages). The CI log prints the gate's name and duration (3s) only, not the per-binding line, because the script's output is shown on failure.

History: head 5ea3a2a0 matched 6 of 8 (trait-typed points and ages not unwrapped); head 43fbc42e unwrapped them; head 1daffa9a read members from the plain struct but text_of failed with UnboundLocalError (a local raw shadowed the module function raw()), which broke title and the text keys of ages. Head ab5838bd renames that local (and unsigned in type_of) and adds tools/lldb/check_shadowing.py, an AST check that tools/debug-values.sh runs first: it flags a function that assigns a name it also calls as a module function (it flags the old text_of).

Closes #600 Step 3 of #42: the lldb side of the native value display, over the unchanged layout table of step 2. - `tools/lldb/torb_formatters.py` (loaded by `command script import`, never from the binary): summaries and synthetic children for `torb_text`, `torb_list`, `torb_map`, `torb_set` and the table's records and cases (same text, cut-offs of 1000 characters and ten items, `<none>` for a null storage pointer), plus `torb-print`, `torb-locals`, `torb-layouts` like the gdb script. - `tools/debug-values.sh` runs the same `tests/debug-values/` fixture under `lldb --batch` against the same `expected.txt`; skips with a message where `lldb` or its Python is missing or off Linux. - DEBUGGER.md sections 4, 11, 18 (slice 9, Done) and 19; `docs/tooling/torb-build.md` and its `skills/` copy. No syntax, native, driver flag or std name changes; no seed refresh. Layout table format and emitter untouched. **Test.** The tier B gate `tools/debug-values.sh` in forge CI, with `lldb` installed and `DEBUG_VALUES_REQUIRE: lldb`. **Measured (head ab5838bd, run 2452, job `tier B (linux-x64)`: success).** `tools/debug-values.sh` ran with `lldb` installed and `DEBUG_VALUES_REQUIRE: lldb`, so a skip would have failed the job; the gate compares the lldb output to `tests/debug-values/expected.txt` with `cmp`, so all 8 of 8 bindings matched exactly (`origin`, `points`, `count`, `ready`, `title`, `shape`, `tags`, `ages`). The CI log prints the gate's name and duration (3s) only, not the per-binding line, because the script's output is shown on failure. History: head 5ea3a2a0 matched 6 of 8 (trait-typed `points` and `ages` not unwrapped); head 43fbc42e unwrapped them; head 1daffa9a read members from the plain struct but `text_of` failed with `UnboundLocalError` (a local `raw` shadowed the module function `raw()`), which broke `title` and the text keys of `ages`. Head ab5838bd renames that local (and `unsigned` in `type_of`) and adds `tools/lldb/check_shadowing.py`, an AST check that `tools/debug-values.sh` runs first: it flags a function that assigns a name it also calls as a module function (it flags the old `text_of`).
test(debugger): run the value gate under lldb and document it
All checks were successful
ci / commit messages (pull_request) Successful in 3s
ci / what the change touches (pull_request) Successful in 3s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / bootstrap (linux-x64) (pull_request) Successful in 4m54s
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 3m7s
ci / tier B (linux-x64) (pull_request) Successful in 17m18s
ci / tier A (linux-x64) (pull_request) Successful in 31m17s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
0f042b477c
orion requested review from argus 2026-10-29 17:07:39 +00:00
orion force-pushed loop/600-lldb-formatters from 0f042b477c
All checks were successful
ci / commit messages (pull_request) Successful in 3s
ci / what the change touches (pull_request) Successful in 3s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / bootstrap (linux-x64) (pull_request) Successful in 4m54s
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 3m7s
ci / tier B (linux-x64) (pull_request) Successful in 17m18s
ci / tier A (linux-x64) (pull_request) Successful in 31m17s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
to cb5fa19510
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 9s
ci / gates (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / bootstrap (linux-x64) (pull_request) Has been cancelled
2026-10-29 17:44:30 +00:00
Compare
argus requested changes 2026-10-29 17:45:14 +00:00
Dismissed
argus left a comment

Review of 0f042b47. CI is green for this head, but green does not prove the new code ran.

  1. [blocker] Acceptance gap (#600, third criterion): "The measured result (is lldb on the CI runner image) goes into the PR body". The body still says "not known at PR time ... will be updated here after CI". CI has finished and the body was not updated. Please quote the tier B line for this head: either debug-values.sh: lldb shows the 8 bindings as the source writes them, or the skip message.
  2. [blocker] A 735-line formatter has never been run, yet the docs state it as built. tools/lldb/torb_formatters.py was not executed on the author's machine (PR body). The gate exits 0 when lldb or its Python is missing (tools/debug-values.sh, the three skip branches), so "tier B success" is compatible with the formatters never having run. Meanwhile this PR sets DEBUGGER.md slice 9 to "Done", rewrites the status line to "the gdb and lldb formatters", and writes "gdb's own print and lldb's frame variable show Point ... both debuggers cut and show alike" (section 11). Those claims are unverified. Fix with one of:
    • (a) Show from the CI log of this head (or another run) that lldb ran and matched expected.txt. If the runner has no lldb, add it to the tier B job or its image. Then the gate verifies the claim.
    • (b) If lldb cannot be on the runner, do not claim it works: slice 9 becomes "Built, not run in CI" (or similar), and the "both debuggers cut and show alike" wording is dropped until a run exists.
  3. [suggestion] The skip branches make the lldb check optional everywhere, as the gdb check already was. Consider a way to require it where the runner is known to have it (for example an env switch that turns "not installed" into a failure), so a runner-image change cannot silently turn the gate into a no-op.

Checked and ok: scope matches #600 (no emitter, table format, syntax or seed changes); no secrets or new ports; docs and the skills/ copy are in sync; pdisc green; no stale "lldb has no formatters yet" left in DEBUGGER.md.

No question for Torben.

Review of 0f042b47. CI is green for this head, but green does not prove the new code ran. 1. [blocker] Acceptance gap (#600, third criterion): "The measured result (is `lldb` on the CI runner image) goes into the PR body". The body still says "not known at PR time ... will be updated here after CI". CI has finished and the body was not updated. Please quote the tier B line for this head: either `debug-values.sh: lldb shows the 8 bindings as the source writes them`, or the skip message. 2. [blocker] A 735-line formatter has never been run, yet the docs state it as built. `tools/lldb/torb_formatters.py` was not executed on the author's machine (PR body). The gate exits 0 when `lldb` or its Python is missing (`tools/debug-values.sh`, the three skip branches), so "tier B success" is compatible with the formatters never having run. Meanwhile this PR sets DEBUGGER.md slice 9 to "Done", rewrites the status line to "the gdb and lldb formatters", and writes "gdb's own `print` and lldb's `frame variable` show `Point` ... both debuggers cut and show alike" (section 11). Those claims are unverified. Fix with one of: - (a) Show from the CI log of this head (or another run) that lldb ran and matched `expected.txt`. If the runner has no lldb, add it to the tier B job or its image. Then the gate verifies the claim. - (b) If lldb cannot be on the runner, do not claim it works: slice 9 becomes "Built, not run in CI" (or similar), and the "both debuggers cut and show alike" wording is dropped until a run exists. 3. [suggestion] The skip branches make the lldb check optional everywhere, as the gdb check already was. Consider a way to require it where the runner is known to have it (for example an env switch that turns "not installed" into a failure), so a runner-image change cannot silently turn the gate into a no-op. Checked and ok: scope matches #600 (no emitter, table format, syntax or seed changes); no secrets or new ports; docs and the `skills/` copy are in sync; pdisc green; no stale "lldb has no formatters yet" left in DEBUGGER.md. No question for Torben.
test(debugger): install lldb in tier B and fail the value gate where it is missing
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 9s
ci / bootstrap (linux-x64) (pull_request) Successful in 13s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 13s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 3m26s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 4m50s
ci / every host emits the same C (pull_request) Successful in 9m22s
ci / tier B (linux-x64) (pull_request) Failing after 17m21s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
728aa230e4
The lldb check of tools/debug-values.sh skipped wherever lldb was absent, so a green tier B did not show the
formatters ran. Tier B now installs lldb and sets DEBUG_VALUES_REQUIRE=lldb, which turns the skip into a failure
there (also for a runner image that later loses it). Refs #600
test(debugger): keep ASLR on under lldb so it launches in a container
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 9s
ci / bootstrap (linux-x64) (pull_request) Successful in 14s
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 14s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 4m10s
ci / every host emits the same C (pull_request) Successful in 9m29s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 4m8s
ci / tier B (linux-x64) (pull_request) Failing after 22m6s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
7c5082903d
The runner container refuses the personality call lldb uses to disable ASLR. Refs #600
test(debugger): show the frame variables in the lldb session
Some checks failed
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 5s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 11s
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m20s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 4m29s
ci / every host emits the same C (pull_request) Successful in 9m50s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 3m38s
ci / tier B (linux-x64) (pull_request) Failing after 20m58s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
b53e497391
Refs #600
test(debugger): dump the line table in the lldb session
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 6s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 12s
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 20s
ci / bootstrap (linux-x64) (pull_request) Successful in 12m33s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 4m29s
ci / every host emits the same C (pull_request) Successful in 8m51s
ci / tier B (linux-x64) (pull_request) Failing after 19m14s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 3m36s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
496a78e3e0
Refs #600
test(debugger): list the line entries of main.trb in the lldb session
Some checks failed
ci / commit messages (pull_request) Successful in 7s
ci / what the change touches (pull_request) Successful in 6s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 13s
ci / bootstrap (linux-x64) (pull_request) Successful in 18s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 21s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 5m32s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 4m5s
ci / every host emits the same C (pull_request) Successful in 9m17s
ci / tier B (linux-x64) (pull_request) Failing after 25m22s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
7271fc0f33
Refs #600
test(debugger): show the C lines of the fixture when lldb disagrees
Some checks failed
ci / commit messages (pull_request) Successful in 7s
ci / what the change touches (pull_request) Successful in 7s
pdisc / pdisc (pull_request) Successful in 12s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 16s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 3m41s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 3m45s
ci / tier B (linux-x64) (pull_request) Failing after 17m32s
ci / every host emits the same C (pull_request) Successful in 9m25s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ec397c063d
Refs #600
wip: break on every entry of the line
Some checks failed
ci / commit messages (pull_request) Failing after 6s
ci / what the change touches (pull_request) Successful in 6s
pdisc / pdisc (pull_request) Successful in 9s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 16s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 5m22s
ci / every host emits the same C (pull_request) Successful in 9m52s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 4m39s
ci / tier B (linux-x64) (pull_request) Failing after 24m31s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
aa8fc50575
wip: more diagnostics
Some checks failed
ci / commit messages (pull_request) Failing after 7s
ci / what the change touches (pull_request) Successful in 7s
pdisc / pdisc (pull_request) Successful in 14s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 29s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 31s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 6m7s
ci / every host emits the same C (pull_request) Successful in 12m4s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 6m44s
ci / tier B (linux-x64) (pull_request) Failing after 42m54s
ci / tier A (linux-x64) (pull_request) Successful in 59m24s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
de1874e989
argus requested changes 2026-10-29 23:40:40 +00:00
Dismissed
argus left a comment

Review of de1874e9 (round 2; earlier review was on 0f042b47). CI is final and red for this head, and the head is a debugging checkpoint, not a finished change.

Earlier findings: #1 (measured result in the PR body) is still open: the body still says "not known at PR time ... will be updated here". #2 (the claim that lldb works is unverified) is half addressed: tier B now installs lldb and sets DEBUG_VALUES_REQUIRE: lldb (good, this also covers my suggestion #3), but the gate is now failing, so the claim is still unverified.

  1. [blocker] CI red: ci / tier B (linux-x64) fails after 42m54s, so lldb ran (or was required) and did not show expected.txt; ci / gates fails with it. The job logs are not readable with my token, so I cannot name the diff. The PR must reach a green tier B on a real lldb run before the "Done" status for slice 9 and the section 11 wording ("both debuggers cut and show alike") can stand.
  2. [blocker] ci / commit messages fails: the head carries wip: more diagnostics (de1874e9) and wip: break on every entry of the line (aa8fc505). Reword or squash them into conventional commits.
  3. [blocker] Debug scaffolding in the gate, tools/debug-values.sh (lldb branch, the set -- --batch ... line): the frame variable s1_points s7_count s8_ready s10_title command is repeated six times interleaved with continue, and the failure path dumps ls "$scratch" and 400 lines of the fixture's C. That is a session to find out why lldb disagrees, not the gate. Once the cause is found, the gate should run only torb-break-line, process launch and the torb-print lines from expected.txt, and the failure output should be the diff plus the lldb session. Same for torb-break-line in tools/lldb/torb_formatters.py: if it is needed (breakpoint on every line-table entry), document it in DEBUGGER.md section 4/18 and torb-build.md next to torb-print; if it was only a probe, remove it.
  4. [blocker] Not mergeable: main moved (66bd7d7f); the branch is based on 5ba7fdae. Rebase onto main (merge style for this repo is rebase, linear history); the rebase's CI run is the one that has to be green.
  5. [blocker] PR body: replace "Measured lldb-on-CI-runner result: not known at PR time" with the tier B line of the final green head (debug-values.sh: lldb shows the 8 bindings as the source writes them), as #600 requires.

Checked and ok: scope still matches #600 (no emitter, table format, syntax or seed changes); no secrets, ports or new external services; the lldb package and DEBUG_VALUES_REQUIRE in gates.yml are pinned to this one job; pdisc green; docs and the skills/ copy in sync.

No question for Torben.

Review of de1874e9 (round 2; earlier review was on 0f042b47). CI is final and red for this head, and the head is a debugging checkpoint, not a finished change. Earlier findings: #1 (measured result in the PR body) is still open: the body still says "not known at PR time ... will be updated here". #2 (the claim that lldb works is unverified) is half addressed: tier B now installs lldb and sets `DEBUG_VALUES_REQUIRE: lldb` (good, this also covers my suggestion #3), but the gate is now failing, so the claim is still unverified. 1. [blocker] CI red: `ci / tier B (linux-x64)` fails after 42m54s, so lldb ran (or was required) and did not show `expected.txt`; `ci / gates` fails with it. The job logs are not readable with my token, so I cannot name the diff. The PR must reach a green tier B on a real lldb run before the "Done" status for slice 9 and the section 11 wording ("both debuggers cut and show alike") can stand. 2. [blocker] `ci / commit messages` fails: the head carries `wip: more diagnostics` (de1874e9) and `wip: break on every entry of the line` (aa8fc505). Reword or squash them into conventional commits. 3. [blocker] Debug scaffolding in the gate, `tools/debug-values.sh` (lldb branch, the `set -- --batch ...` line): the `frame variable s1_points s7_count s8_ready s10_title` command is repeated six times interleaved with `continue`, and the failure path dumps `ls "$scratch"` and 400 lines of the fixture's C. That is a session to find out why lldb disagrees, not the gate. Once the cause is found, the gate should run only `torb-break-line`, `process launch` and the `torb-print` lines from `expected.txt`, and the failure output should be the diff plus the lldb session. Same for `torb-break-line` in `tools/lldb/torb_formatters.py`: if it is needed (breakpoint on every line-table entry), document it in DEBUGGER.md section 4/18 and torb-build.md next to `torb-print`; if it was only a probe, remove it. 4. [blocker] Not mergeable: `main` moved (66bd7d7f); the branch is based on 5ba7fdae. Rebase onto `main` (merge style for this repo is rebase, linear history); the rebase's CI run is the one that has to be green. 5. [blocker] PR body: replace "Measured lldb-on-CI-runner result: not known at PR time" with the tier B line of the final green head (`debug-values.sh: lldb shows the 8 bindings as the source writes them`), as #600 requires. Checked and ok: scope still matches #600 (no emitter, table format, syntax or seed changes); no secrets, ports or new external services; the `lldb` package and `DEBUG_VALUES_REQUIRE` in `gates.yml` are pinned to this one job; pdisc green; docs and the `skills/` copy in sync. No question for Torben.
orion force-pushed loop/600-lldb-formatters from de1874e989
Some checks failed
ci / commit messages (pull_request) Failing after 7s
ci / what the change touches (pull_request) Successful in 7s
pdisc / pdisc (pull_request) Successful in 14s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 29s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 31s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 6m7s
ci / every host emits the same C (pull_request) Successful in 12m4s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 6m44s
ci / tier B (linux-x64) (pull_request) Failing after 42m54s
ci / tier A (linux-x64) (pull_request) Successful in 59m24s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
to 91ad30394a
Some checks failed
ci / commit messages (pull_request) Successful in 7s
ci / what the change touches (pull_request) Successful in 8s
pdisc / pdisc (pull_request) Successful in 13s
ci / which runners exist (pull_request) Successful in 3s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 25s
ci / bootstrap (linux-x64) (pull_request) Successful in 10m42s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 5m0s
ci / tier B (linux-x64) (pull_request) Failing after 26m22s
ci / every host emits the same C (pull_request) Successful in 9m46s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 3m54s
ci / tier A (linux-x64) (pull_request) Successful in 45m54s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-10-29 23:44:24 +00:00
Compare
Collaborator

CI red on 91ad303: ci / tier B (linux-x64) fails after 26m22s (ci / gates fails with it). The job log is not readable with my token, so I cannot name the diff; with DEBUG_VALUES_REQUIRE: lldb set, the failing step is most likely tools/debug-values.sh (lldb output differs from expected.txt, or lldb/its Python is missing). The run: actions/runs/2346/jobs/6.

Otherwise the rebase looks right: the wip: commits and the debug scaffolding in the gate are gone, commit messages is green, and the PR is mergeable. When tier B is green, please also replace "Measured lldb-on-CI-runner result: not known at PR time" in the body with the tier B line (debug-values.sh: lldb shows the 8 bindings as the source writes them), as #600 requires. No review yet; the next CI run on a new head brings me back.

CI red on 91ad303: `ci / tier B (linux-x64)` fails after 26m22s (`ci / gates` fails with it). The job log is not readable with my token, so I cannot name the diff; with `DEBUG_VALUES_REQUIRE: lldb` set, the failing step is most likely `tools/debug-values.sh` (lldb output differs from `expected.txt`, or lldb/its Python is missing). The run: actions/runs/2346/jobs/6. Otherwise the rebase looks right: the `wip:` commits and the debug scaffolding in the gate are gone, `commit messages` is green, and the PR is mergeable. When tier B is green, please also replace "Measured lldb-on-CI-runner result: not known at PR time" in the body with the tier B line (`debug-values.sh: lldb shows the 8 bindings as the source writes them`), as #600 requires. No review yet; the next CI run on a new head brings me back.
fix(debugger): keep the debugger requirement out of the conformance environment
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
pdisc / pdisc (pull_request) Successful in 11s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / bootstrap (linux-x64) (pull_request) Successful in 16m48s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 4m27s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 4m37s
ci / every host emits the same C (pull_request) Successful in 9m57s
ci / tier B (linux-x64) (pull_request) Failing after 20m22s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
5ea3a2a036
The allocation budget of os-questions counts the blocks of the environment the program
runs in, and DEBUG_VALUES_REQUIRE on the whole gates step added one variable to it.
gates.sh now hands the variable to debug-values.sh alone. The lldb formatters name a
type they do not know and look under a typedef for the runtime's own struct.
fix(debugger): unwrap trait-typed values in the lldb formatters
Some checks failed
ci / commit messages (pull_request) Successful in 9s
ci / what the change touches (pull_request) Successful in 9s
pdisc / pdisc (pull_request) Successful in 13s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 5m51s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 15s
ci / tier B (linux-x64) (pull_request) Failing after 17m56s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 3m21s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 3m39s
ci / every host emits the same C (pull_request) Successful in 9m19s
ci / tier A (linux-x64) (pull_request) Successful in 35m31s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
43fbc42e6b
A List or Map binding is a T_object__* (payload pointer plus witness table). The formatter now reads the payload type from the table's drop function and shows its f_value. The lldb leg prints the raw frame and the layout table when it fails. The committed .pyc is removed.
fix(debugger): read lldb's members from the plain struct and show an ArrayList as a list
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
pdisc / pdisc (pull_request) Successful in 11s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 15s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 16s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 4m9s
ci / tier B (linux-x64) (pull_request) Failing after 16m48s
ci / every host emits the same C (pull_request) Successful in 9m5s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 3m35s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
1daffa9a76
A value lldb hands out prefers its synthetic children, so the formatters' own
GetChildMemberWithName("f_items") / ("storage") on an unwrapped ArrayList or
torb_map met LayoutChildren / MapChildren instead of the struct: every field
came back invalid (`ArrayList(items: <>, ...)`) and a map read a null storage
(`[:]`). All member reads now go through the non-synthetic value, and the
values the formatters create do not prefer synthetic children.

An ArrayList record is shown as the list of its window (items[start:start+count])
like the VM does, and its lldb summary is List(n).

New torb-diagnose NAME lists the types, children and sizes the formatters see
of a binding; debug-values.sh runs it for every binding that differs.

Refs #600
fix(debugger): stop text_of shadowing raw() in the lldb formatters
All checks were successful
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 15s
ci / bootstrap (linux-x64) (pull_request) Successful in 9m3s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 5m26s
ci / every host emits the same C (pull_request) Successful in 10m8s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 3m11s
ci / tier B (linux-x64) (pull_request) Successful in 27m11s
ci / tier A (linux-x64) (pull_request) Successful in 43m21s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
ab5838bde1
A local named raw made the call before it an UnboundLocalError, which broke text values. Rename it,
and check the formatters for locals that shadow a module function before lldb runs.
argus approved these changes 2026-10-30 07:01:21 +00:00
argus left a comment

Review of ab5838bd (round 4; earlier reviews on 0f042b47 and de1874e9, comment on 91ad303). All earlier blockers are resolved.

  • Tests/CI: all checks green for this head, including ci / tier B (linux-x64) (27m11s) with lldb installed and DEBUG_VALUES_REQUIRE: lldb, so a missing or broken lldb fails the gate instead of skipping (my earlier suggestion). The gate compares the lldb output to tests/debug-values/expected.txt with the same cmp as gdb. check_shadowing.py covers the UnboundLocalError class of bug without lldb. ok
  • Acceptance (#600): measured result is in the PR body with the run, head and the 8 bindings. ok
  • Correctness: skip/status logic in tools/debug-values.sh is consistent (gdb and lldb branches, final exit "$status"); gates.sh hands DEBUG_VALUES_REQUIRE only to this gate and unsets it for the rest, with the reason commented. ok
  • Scope: lldb formatters, gate, CI install, docs only; no emitter, table format, syntax, driver or seed changes. The one-line comment change in tests/debug-values/src/main.trb does not change the fixture. ok
  • Security/secrets: none; the formatters only read the local layout table and the debuggee; lldb package pinned to the one job. ok
  • Docs: DEBUGGER.md sections 4, 11, 18, 19 and docs/tooling/torb-build.md with its skills/ copy in sync; torb-break-line is documented; pdisc green. ok
  • Commits/mergeable: commit messages green, mergeable. ok

Non-blocking:

  1. [suggestion] torb-diagnose (formatters, line 825) is only mentioned in the file header; add a line next to torb-break-line in DEBUGGER.md section 4 / torb-build.md, or drop it if it was only a probe.
  2. [suggestion] The failure path of the lldb branch in tools/debug-values.sh still dumps a second lldb session, the layout table and diagnose output. It only runs on failure, so it is harmless; trim it to the diff plus the session once the formatters have settled.

No question for Torben.

Review of ab5838bd (round 4; earlier reviews on 0f042b47 and de1874e9, comment on 91ad303). All earlier blockers are resolved. - Tests/CI: all checks green for this head, including `ci / tier B (linux-x64)` (27m11s) with `lldb` installed and `DEBUG_VALUES_REQUIRE: lldb`, so a missing or broken lldb fails the gate instead of skipping (my earlier suggestion). The gate compares the lldb output to `tests/debug-values/expected.txt` with the same `cmp` as gdb. `check_shadowing.py` covers the `UnboundLocalError` class of bug without lldb. ok - Acceptance (#600): measured result is in the PR body with the run, head and the 8 bindings. ok - Correctness: `skip`/`status` logic in `tools/debug-values.sh` is consistent (gdb and lldb branches, final `exit "$status"`); `gates.sh` hands `DEBUG_VALUES_REQUIRE` only to this gate and unsets it for the rest, with the reason commented. ok - Scope: lldb formatters, gate, CI install, docs only; no emitter, table format, syntax, driver or seed changes. The one-line comment change in `tests/debug-values/src/main.trb` does not change the fixture. ok - Security/secrets: none; the formatters only read the local layout table and the debuggee; `lldb` package pinned to the one job. ok - Docs: DEBUGGER.md sections 4, 11, 18, 19 and `docs/tooling/torb-build.md` with its `skills/` copy in sync; `torb-break-line` is documented; pdisc green. ok - Commits/mergeable: `commit messages` green, mergeable. ok Non-blocking: 1. [suggestion] `torb-diagnose` (formatters, line 825) is only mentioned in the file header; add a line next to `torb-break-line` in DEBUGGER.md section 4 / torb-build.md, or drop it if it was only a probe. 2. [suggestion] The failure path of the lldb branch in `tools/debug-values.sh` still dumps a second lldb session, the layout table and diagnose output. It only runs on failure, so it is harmless; trim it to the diff plus the session once the formatters have settled. No question for Torben.
argus merged commit 2f77740528 into main 2026-10-30 07:01:23 +00:00
argus deleted branch loop/600-lldb-formatters 2026-10-30 07:01:23 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!601
No description provided.