package binsec
Module Binsec_cli_ghidra.Ghidra_cfgSource
Source
type kind = | Fallthrough(*The instruction jumps to its immediate follower.
*)| Branch(*The instruction branchs to another one.
*)| Call(*The instruction calls a function.
*)| Return of Binsec.Virtual_address.t(*The instruction returns to the caller.
*)| Presumed(*The instruction calls a function that may not return properly. Its immediate follower is taken as successor.
*)
include Graph.Sig.I
with type V.t = Binsec.Virtual_address.t
and type E.t = Binsec.Virtual_address.t * kind * Binsec.Virtual_address.t
module V : sig ... endtype vertex = V.tmodule E : sig ... endtype edge = E.tval is_empty : t -> boolval nb_vertex : t -> intval nb_edges : t -> intval create : ?size:??? -> unit -> tval clear : t -> unitparse_cache ~path build a new graph from the saved textual output of a previously Ghidra run.
Source
val run_ghidra :
?temp_dir:string ->
?cache:string ->
runner:string ->
string ->
t * string Binsec.Virtual_address.Htbl.trun_ghidra ?cache ~runner binary run Ghidra disassembly on the binary file and extract its control flow graph.
import () calls run_ghidra or parse_cache on the executatble file (Kernel_options.ExecFile) according to the global options Ghidra_options.Runner and Ghidra_options.Cache.