package binsec

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Canonical representation of an instruction

Type

type t = private {
  1. address : Virtual_address.t;
  2. size : Size.Byte.t;
  3. opcode : Binstream.t;
  4. mnemonic : Mnemonic.t;
  5. dba_block : Dhunk.t;
}
val address : t -> Virtual_address.t

Accessors

val size : t -> Size.Byte.t
val opcode : t -> Binstream.t
val mnemonic : t -> Mnemonic.t
val hunk : t -> Dhunk.t

Basics

module type Basic = sig ... end
module Make (P : Sigs.PRINTABLE) : Basic with type mnemonic = P.t

Generic disassembled instruction type

module Generic : sig ... end

Constructors

val empty : Dba_types.Caddress.t -> t
val unsupported : Virtual_address.t -> Size.Byte.t -> Binstream.t -> Mnemonic.t -> t

Create an instruction without supporting DBA semantics.

This function should not be used when the menmonic is supported. It will fail in that case.

val of_generic_instruction : Virtual_address.t -> Generic.t -> Dhunk.t -> t
val of_dba_block : ?mnemonic:Mnemonic.t -> Virtual_address.t -> Dhunk.t -> t
val to_generic_instruction : t -> Generic.t
val set_dba_block : t -> Dhunk.t -> t
val set_mnemonic : Mnemonic.t -> t -> t
val is_decoded : t -> bool
val stop : Virtual_address.t -> t

Other accessors

val get_caddress : t -> Dba_types.Caddress.t
val start : t -> int
include Sigs.PRINTABLE with type t := t
val pp : Format.formatter -> t -> unit
OCaml

Innovation. Community. Security.