Skip to content

EVT backtraces#177

Open
bates64 wants to merge 2 commits into
mainfrom
evt-backtrace
Open

EVT backtraces#177
bates64 wants to merge 2 commits into
mainfrom
evt-backtrace

Conversation

@bates64

@bates64 bates64 commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Appends the currently executing EVT script and its parents to the crash screen backtrace. For example:

image

(Script in yellow)

Other changes required to get this to work:

  • Data symbols (without line numbers as they lack DWARF info) are now included in the symbol table.
  • The EVT_CMD macro packs the current line number into the upper half of the argc field. The new EVT_CMD_ARGC unpacks the argc out of the field.

Closes #38.

@bates64 bates64 added the questionable This is risky or potentially invalid or undesirable label Jun 8, 2026
@bates64 bates64 requested a review from z64a June 8, 2026 21:20
Appends the currently executing EVT script and its parents to the crash screen
backtrace. For example:

    Call stack:
      in get_npc_safe (...)
      in SomeApiFunc (...)
      in EVS_SomeScript (...)  <- new!
      in EVS_ParentScript (...) <- script that Exec'd EVS_SomeScript

Other changes required to get this to work:
- Data symbols (without line numbers as they lack DWARF info) are now included
  in the symbol table.
- The EVT_CMD macro packs the current line number into the upper half of
  the `argc` field. The new `EVT_CMD_ARGC` unpacks the argc out of the field.
- Colours!
- Readable error messages for CPU exceptions
- Two-line backtrace format similar to Rust/Go
- Inline disassembly showing 3 instructions near the crash site
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

questionable This is risky or potentially invalid or undesirable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EVT backtraces

1 participant