Module Disasm_core

module Disasm_core: sig .. end
Core functionalities for disassembly

exception Decode_error of string

Worklist definition for disassembly


module W: sig .. end

Basic successors definition


module Successors: sig .. end
val decode : Dba_types.Virtual_address.t ->
Disasm_types.Instruction.t * Dba_types.Virtual_address.t option
decode addr decodes the contents of address addr

Iterators


val fold : ('a ->
W.t ->
Disasm_types.Instruction.t ->
Dba_types.Virtual_address.Set.t -> 'a * W.t) ->
'a -> W.t -> 'a
fold f wl v starts disassembly from worklist wl (i.e. an initial state) using function f to guide its choices to compute a value intialized to v.

In particular, f is called after each successful disassembly to compute a new worklist and a new value. It receives from the disassembly loop the current value, the current worklist, the decoded instruction, and a list of identified successors to this instruction.

The set of successors is computed according to the disassembly mode. The default is recursive as stated in Disasm_options.

If you want the linear successors only do:

Disasm_options.DisassemblyMode.set "linear";

before starting the fold functions.

val iter : (W.t ->
Disasm_types.Instruction.t ->
Dba_types.Virtual_address.Set.t -> W.t) ->
W.t -> unit
iter f worklist iterates disassembles an executable with function f.

Given the signature of the function, all computations, except worklist management, must take place as imperative side-effects.

module type Iterable = sig .. end
Functors
module Make: 
functor (I : Iterable) -> sig .. end