package bap-std

  1. Overview
  2. Docs
On This Page
  1. Tags
Legend:
Library
Module
Module type
Parameter
Class
Class type

Disassembled program. An interface for diassembling things.

type t = disasm
val create : cfg -> t

create cfg

val of_mem : ?backend:string -> ?brancher:brancher -> ?rooter:rooter -> arch -> mem -> t Core_kernel.Std.Or_error.t

disassemble ?roots arch mem disassemble provided memory region mem using best available algorithm and backend for the specified arch. Roots, if provided, should point to memory regions, that are believed to contain code. At best, this should be a list of function starts. If no roots are provided, then the starting address of the provided memory mem will be used as a root.

The returned value will contain all memory reachable from the a given set of roots, at our best knowledge.

val of_image : ?backend:string -> ?brancher:brancher -> ?rooter:rooter -> image -> t Core_kernel.Std.Or_error.t

disassemble_image image disassemble a given image. Will take executable segments of the image and disassemble it, applying disassemble function. If no roots are specified, then symbol table will be used as a source of roots. If file doesn't contain one, then entry point will be used.

val of_file : ?backend:string -> ?brancher:brancher -> ?rooter:rooter -> ?loader:string -> string -> t Core_kernel.Std.Or_error.t

disassemble_file ?roots path takes a path to a binary and disassembles it

module With_exn : sig ... end

With_exn.f is the same as f except that it throws an exception instead of returning Error.

val merge : t -> t -> t

merge d1 d2 is a union of control flow graphs and erros of the two disassemblers.

val insns : t -> (mem * insn) seq

returns all instructions that was successfully decoded in an ascending order of their addresses. Each instruction is accompanied with its block of memory.

val cfg : t -> cfg

A whole program CFG.

Tags

val insn : insn tag

machine instruction.

OCaml

Innovation. Community. Security.