compiler/ast/ndi

  Source   Edit

This module implements the generation of .ndi files for better debugging support of Nim code. "ndi" stands for "Nim debug info".

Types

NdiFile = object
  enabled: bool
  f: File
  buf: string
  filename: AbsoluteFile
  mappings: seq[Mapping]
  Source   Edit

Procs

proc close(f: var NdiFile; conf: ConfigRef) {....raises: [IOError],
    tags: [WriteIOEffect].}
  Source   Edit
proc open(f: var NdiFile; filename: AbsoluteFile; conf: ConfigRef) {....raises: [],
    tags: [].}
  Source   Edit

Templates

template writeMangledName(f: NdiFile; info: TLineInfo; orig: PIdent; n: string;
                          conf: ConfigRef; id = 0)

If f is enabled, registers a symbol-to-name mapping entry where info is the definition's source position, orig the user-provided symbol name, and n the mangled name. Nothing is written to disk yet.

id is an additional value meant for debugging purposes that is stored toghether with the mapping but is not written to the file.

  Source   Edit
template writeMangledName(f: NdiFile; s: PSym; n: string; conf: ConfigRef)
Same as the other writeMangledName overload, but takes the TLineInfo and PIdent from the symbol s.   Source   Edit