Skip to main content

Module debug

Module debug 

Source
Expand description

JIT debugging tools.

Provides reusable infrastructure for debugging JIT-compiled code:

  • LambdaRegistry: maps code pointers back to lambda names
  • heap_describe: human-readable description of heap objects
  • heap_validate: structural integrity checks for heap objects
  • TracingClosureCaller: wraps closure calls with logging

Tracing is controlled by the TIDEPOOL_TRACE env var:

  • TIDEPOOL_TRACE=calls — log each closure call (name, arg, result)
  • TIDEPOOL_TRACE=heap — also validate heap objects before use

Structs§

LambdaRegistry
Maps JIT code pointers to human-readable lambda names.
TracingClosureCaller
A closure caller that validates both closure and argument before each call.

Enums§

HeapError
Validation errors for heap objects.
TraceLevel
Trace level, controlled by TIDEPOOL_TRACE env var.

Functions§

clear_lambda_registry
Clear the global registry.
heap_describe
Describes a heap object in human-readable form.
heap_validate
Validate a heap object’s structural integrity.
heap_validate_deep
Validate a heap object and all its pointer fields (one level deep).
lookup_lambda
Look up a code pointer in the global registry.
lookup_lambda_by_address
Look up a lambda name by an address within its body in the global registry.
set_lambda_registry
Install a registry as the global singleton. Returns the old one if any.
trace_level
Read the trace level from the environment. Cached after first call.