type t = backtrace_slot
val is_raise : t -> bool
is_raise slot
istrue
whenslot
refers to a raising point in the code, andfalse
when it comes from a simple function call.- since
- 4.02
val is_inline : t -> bool
is_inline slot
istrue
whenslot
refers to a call that got inlined by the compiler, andfalse
when it comes from any other context.- since
- 4.04.0
val location : t -> location option
location slot
returns the location information of the slot, if available, andNone
otherwise.Some possible reasons for failing to return a location are as follow:
- the slot corresponds to a compiler-inserted raise
- the slot corresponds to a part of the program that has not been compiled with debug information (
-g
)
- since
- 4.02
val format : int -> t -> string option
format pos slot
returns the string representation ofslot
asraw_backtrace_to_string
would format it, assuming it is thepos
-th element of the backtrace: the0
-th element is pretty-printed differently than the others.Whole-backtrace printing functions also skip some uninformative slots; in that case,
format pos slot
returnsNone
.- since
- 4.02