package mopsa
Module Core.Callstack
Callstack - representation of the call stack of a program execution
Call sites
**************
type callsite = {call_fun_orig_name : string;(*Original name of the called function
*)call_fun_uniq_name : string;(*Unique name of the called function
*)call_range : Location.range;(*Call location
*)
}Call site is the location of a call in the program
val pp_callsite : Format.formatter -> callsite -> unitPrint a call site
type callstack = callsite listval pp_callstack : Format.formatter -> callstack -> unitPrint a call stack
val pp_callstack_short : Format.formatter -> callstack -> unitPrint a call stack in a short style
val empty_callstack : callstackEmpty call stack
val is_empty_callstack : callstack -> boolCheck that a call stack is empty
val callstack_length : callstack -> intReturn the length of a call stack
val push_callstack :
string ->
?uniq:string ->
Location.range ->
callstack ->
callstackpush_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.
pop_callstack cc returns the last call site in cc and the remaining callstack Raises Empty_callstack if the call stack is empty.
callstack_top cs returns the last call site in cs. Raises Empty_callstack if the call stack is empty.