This module contains some utility procedures for inspecting VM-related data.
The VM doesn't depend on the procedures here in order to function - they are only meant as a logging and debugging aid.
Procs
proc codeListing(c: TCtx; start = 0; last = -1): seq[DebugVmCodeEntry] {. ...raises: [], tags: [].}
- Produces a listing of the instructions in c that are located in the instruction range start..last. If last < 0, then all instructions after position start are included in the listing. The instructions are ordered by their position Source Edit
proc renderCodeListing(config: ConfigRef; sym: PSym; entries: seq[DebugVmCodeEntry]): string {. ...raises: [ValueError, KeyError, Exception], tags: [ReadDirEffect, RootEffect].}
- Renders the code listing entries to text. sym is an optional symbol that, if provided, is used for providing additional context. Source Edit