diff --git a/docs/debugger.md b/docs/debugger.md index 85aa934..1f25fca 100644 --- a/docs/debugger.md +++ b/docs/debugger.md @@ -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 | diff --git a/docs/error-handling.md b/docs/error-handling.md index c746801..1b0628d 100644 --- a/docs/error-handling.md +++ b/docs/error-handling.md @@ -317,11 +317,16 @@ v := parse(s) catch e { ``` ``` -error trace: - raised error.BadDigit - at parse_digit (parse.sx:12:5) - at parse_int (parse.sx:34:13) - at handle_line (main.sx:21:8) +error return trace (most recent call last): + parse_digit at parse.sx:12:5 + c := s[i] or raise error.BadDigit; + ^ + parse_int at parse.sx:34:13 + try parse_digit(s); + ^ + handle_line at main.sx:21:8 + try parse_int(line); + ^ ``` Traces are on by default in debug builds and compiled out in release