docs: fix stale error-trace output format + markers

The trace docs predated the current formatter. Corrected against the real
output (library/modules/trace.sx to_string + examples/expected/1025-errors-
trace-format.stderr):
- error-handling.md: replace the obsolete trace example ("error trace:" /
  "raised error.X" / "at func (file:line)") with the real format —
  "error return trace (most recent call last):" + per-frame "func at
  file:line:col" + source line + caret.
- debugger.md: drop the stale "(planned)" marker on the trace formatter
  (it is implemented); the tag-name table note now cites the failable-main
  reporter's "unhandled error reached main: error.X" line, not a
  nonexistent "raised error.X" trace line.
This commit is contained in:
agra
2026-06-03 16:54:36 +03:00
parent 973543ddf8
commit 99a5c781a0
2 changed files with 12 additions and 7 deletions

View File

@@ -280,7 +280,7 @@ traces and DWARF can never disagree:
which file a function's spans index.
-`errors.SourceLoc.compute(source, span.start)` turns an offset into
`{line, col}`. Used by the diagnostics renderer, `#caller_location`,
the DWARF emitter, and (planned) the trace formatter — one function,
the DWARF emitter, and the trace formatter — one function,
every consumer.
### Trace path: compile → run → format
@@ -397,7 +397,7 @@ symbolization is delegated to the platform debugger — sx ships none.
| Artifact | Lookup | Size | Shipped in release? |
|---|---|---|---|
| **Tag-name table** | tag id → name string | tiny (per distinct tag) | **yes, always** — `{}` interpolation, the `main` wrapper, and the trace's "raised error.X" line need names even in release |
| **Tag-name table** | tag id → name string | tiny (per distinct tag) | **yes, always** — `{}` interpolation and the failable-`main` reporter's `error: unhandled error reached main: error.X` line need names even in release |
| **`Frame` location table** | push site → `{file,line,col,func}` | small (interned strings; per push site) | **debug / `--release-traces` only** — rides the trace-mode gate |
| **DWARF (`.debug_line` / `DISubprogram`)** | PC → file:line:col, for *debuggers* | larger (per source position) | **debug / `--release-traces` only**, strippable; consumed by `lldb`/`gdb`, never by the trace formatter |