package bap-std
Brancher is responsible for resolving destinations of branch instructions.
type t = brancher
val sexp_of_dest : dest -> Ppx_sexp_conv_lib.Sexp.t
val dest_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> dest
type dests = dest list
val sexp_of_dests : dests -> Ppx_sexp_conv_lib.Sexp.t
val dests_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> dests
val create : (mem -> Disasm_expert.Basic.full_insn -> dests) -> t
create resolve
creates a brancher from resolve
function, that accepts a memory region, occupied by an instruction, the instruction itself and returns a list of destination.
set_path s
limits the symbolizer applicability only to addresses that belong to a file/compilation unit with the specified path.
val path : t -> string option
path s
is the path to the file that this symbolizer serves.
of_bil arch
creates a brancher that will use a BIL code to statically deduce the instruction destinations.
val resolve : t -> mem -> Disasm_expert.Basic.full_insn -> dests
resolve brancher mem insn
returns a list of destinations of the instruction insn
, that occupies memory region mem
.
val provide : t -> unit
provide brancher
provides the brancher information to the knowledge base.
val providing :
t ->
(unit -> 'a Bap_knowledge.knowledge) ->
'a Bap_knowledge.knowledge
providing t scope
provides the information in the specified scope
,
After the scope
function is evaluated the information source is retracted from the knowledge base.
See Bap_knowledge.Knowledge.promising{promising
}
.
module Factory : Source.Factory.S with type t = t