package owee

  1. Overview
  2. Docs

Module Owee_locationSource

Sourcetype t

An abstract type representing compiled program locations. It is designed to make sampling cheap (see extract), deferring most of the work in the much more expensive lookup function (without guarantee to succeed).

Sourceval none : t

A location that can never be resolved

Sourceval extract : (_ -> _) -> t

Sample the location from an arbitrary OCaml function. Cheap, appropriate to use on a fast path.

Sourceval lookup : t -> (string * int * int) option

Turn a location into an actual position. If it succeeds, the position is returned as a triplet (file, line, column). To succeed, debug information must be available for the location.

This call might be quite expensive.

Sourceval locate : (_ -> _) -> (string * int * int) option

Convenience function composing lookup and extract, to immediately turn a function into a position.

Sourceval nearest_symbol : t -> string
Sourceval demangled_symbol : string -> string
Sourceval nearest_demangled_symbol : t -> string
OCaml

Innovation. Community. Security.