Module Hooks.Make
Parameters
module State : Dba2Codex.StateSmodule Record_cfg : Record_cfg.SSignature
type hook = | SkipTo of skip_type * Binsec.Virtual_address.t(*skip to address
*)| Hook of Record_cfg.t -> State.t -> Record_cfg.t * (Binsec.Virtual_address.t * State.t) list(*Manually change the transfer function of an instruction.
*)| ChangeState of State.t -> State.t(*Modifies the state before executing the corresponding instruction.
*)| Unroll of int(*Unroll every loop having this address as its head. Argument: number of iterations.
*)| EndPath(*End this trace
*)| Return of Types.TypedC.typ option(*End this trace and check the return type if given
*)| EntryCall of string * Types.TypedC.typ(*Used during interprocedural analysis to enter the entry function, but should be replaced the first time it is encountered
*)
val find_hook : Binsec.Virtual_address.t -> hook * stringFinds a hook, or raise Not_found.
Says whether the analysis should be "merge over all paths" only. Initially false.
Add a hook to say that we should stop at this address.
val add_return_unknown : Binsec.Virtual_address.t -> Types.TypedC.typ -> unitAdd a hook to a function address to say that the function should return and just return a value of some type.
Add a hook to a function address to say that the address does nothing, instead it directly jumps to dest.
val add_entrycall :
name:string ->
Binsec.Virtual_address.t ->
Types.TypedC.typ ->
unitval add_function_hook :
name:string ->
Binsec.Virtual_address.t ->
Types.TypedC.typ ->
unitval add_return : Binsec.Virtual_address.t -> Types.TypedC.typ option -> unit