package mopsa

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Utils_core.CallstackSource

Callstack - representation of the call stack of a program execution

Call sites

**************

Sourcetype callsite = {
  1. call_fun_orig_name : string;
    (*

    Original name of the called function

    *)
  2. call_fun_uniq_name : string;
    (*

    Unique name of the called function

    *)
  3. call_range : Location.range;
    (*

    Call location

    *)
}

Call site is the location of a call in the program

Sourceval pp_callsite : Stdlib.Format.formatter -> callsite -> unit

Print a call site

Sourceval compare_callsite : callsite -> callsite -> int

Compare two call sites

Call stacks

***************

Sourcetype callstack = callsite list

A call stack

Sourceval pp_callstack : Stdlib.Format.formatter -> callstack -> unit

Print a call stack

Sourceval pp_callstack_short : Stdlib.Format.formatter -> callstack -> unit

Print a call stack in a short style

Sourceval compare_callstack : callstack -> callstack -> int

Compare two call stacks

Sourceval empty_callstack : callstack

Empty call stack

Sourceval is_empty_callstack : callstack -> bool

Check that a call stack is empty

Sourceval callstack_length : callstack -> int

Return the length of a call stack

Sourceval push_callstack : string -> ?uniq:string -> Location.range -> callstack -> callstack

push_callstack orig ~uniq range cs adds the call to function orig at location range at the top of the call stack cs. The default unique function name of the function is its original name.

Sourceexception Empty_callstack

Exception raised when a call stack is empty

Sourceval pop_callstack : callstack -> callsite * callstack

pop_callstack cs returns the last call site in cs and the remaining call stack. Raises Empty_callstack if the call stack is empty.

Sourceval callstack_top : callstack -> callsite

callstack_top cs returns the last call site in cs. Raises Empty_callstack if the call stack is empty.

Sourceval callstack_begins_with : callstack -> callstack -> bool

callstack_begins_with ext cs checks that ext is an extension of cs, i.e. ext = x @ cs

OCaml

Innovation. Community. Security.