Skip to content

Improvement: a crash record reads as names - #1493

Merged
repeat98 merged 4 commits into
mainfrom
improvement/crash-address-names
Nov 13, 2026
Merged

repeat98 merged 4 commits into
mainfrom
improvement/crash-address-names

Conversation

@repeat98

Copy link
Copy Markdown
Owner
  • What was wrong or hard: A crash record gave a program counter and eight stack longs as hex. Draft Octatrack base: a crash record names the modules behind it #1321 names the module behind a crash, but an address in the base or in stock code stayed a bare number, on the unit tool and in pulled diagnostics alike.
  • What this changes: device -- crash, diaglog and diagnostics:pull print the function the program counter was in and what the stack points at, for example in mw_frame_exit+0x2c, stack holds modwerk_diag_frame+0x20, UART1_FLUSH+0x4. The names come from symbols.json of each base built with octatrack:base -- --out or started with boot DIR on that computer, kept under the base's identity in ~/.cache/modwerk-local/octatrack/symbols/. A developer's own names for stock addresses go in ~/.cache/modwerk-local/octatrack/addresses.json. Neither file is committed. A record from a base with no kept build prints without names, never with another base's. A name reaches 4 KB past its address; further on, nothing is named.
  • How I checked it: npm run pr:ready says Ready after merging main. New tests in src/dev/address-names.test.ts and one in scripts/diagnostics-pull.test.mjs. Tried once on a real development build's symbols.json, which gave the line above. Not tried on a unit: no crash record was read from hardware with it.
  • What the guides lacked or got wrong, and where I fixed it: docs/OCTATRACK_DRIVING.md did not say a crash record could be named; its crash row now says how and where the notes file lives.

For review:

  • src/dev/address-names.ts is dual-licensed (GPL-3.0-or-later OR Elastic-2.0) and added to the shared files in LICENSES/platform.json, because the GPL device and base tools and the Elastic-2.0 diagnostics:pull both import it. That entry is the owner's licence decision.
  • Names exist only for bases built or started here from now on. The base that is live today needs one octatrack:base -- --out build to be named.
  • Not checked: whether another output layout of the base shares the main layout's symbols. If it does not, records from those units print without names.

🤖 Generated with Claude Code

repeat98 and others added 4 commits November 12, 2026 22:57
device crash, diaglog and diagnostics:pull name the program counter and what the
stack points at, from the symbols of each base built or started on this computer
and the developer's own notes on stock addresses. Neither is committed.

Co-Authored-By: Claude <noreply@anthropic.com>
diagnostics:pull is an Elastic-2.0 pipeline tool and the device and base tools are
GPL, so the names they share are dual-licensed in src/dev and listed in
LICENSES/platform.json.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the enhancement New feature or request label Nov 13, 2026
@repeat98
repeat98 merged commit 0748984 into main Nov 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant