Module BCHARMAssemblyInstructions

Holds an array of all of the assembly instructions, made available through a class instance reference.

This is the backing store of all assembly instructions.

val arm_assembly_instructions : BCHARMTypes.arm_assembly_instructions_int Stdlib.ref

Return a reference to the class wrapper of the array of assembly instructions.

val initialize_arm_instructions : (string * BCHLibTypes.doubleword_int * BCHLibTypes.doubleword_int) list -> unit

Create an array of the given size to hold the assembly instructions.

val initialize_arm_assembly_instructions : (string * BCHLibTypes.doubleword_int * BCHLibTypes.doubleword_int) list -> BCHLibTypes.data_block_int list -> unit

Initialize the instruction array with instructions

val set_data_references : BCHLibTypes.doubleword_int list -> unit

Replace instructions with data blocks

val set_arm_assembly_instruction : BCHARMTypes.arm_assembly_instruction_int -> unit

set_arm_assembly_instruction instr enters instr at the address obtained from instr#get_address in arm_assembly_instructions store. If the obtained address is out-of-range an error message is logged and the instruction is further ignored.

get_arm_assembly_instruction a returns the assembly instruction at virtual address a. If a is out-of-range or if there is no instruction at a None is returned.

get_next_valid_instruction_address a returns the smallest address greater than a that is the address of a valid instruction, without intervening data blocks or jump tables. If a is out-of-range or no such address exists, None is returned.

val has_next_valid_instruction : BCHLibTypes.doubleword_int -> bool

has_next_valid_instruction a returns true if there is an instruction with address higher than a with a valid instruction, without intervening data blocks or jump tables.

records the aggregate in assembly_instructions and annotates the instructions that are part of the aggregate.

val has_aggregate : BCHLibTypes.doubleword_int -> bool

has_aggregate iaddr return true if an aggregate is registered at virtual address iaddr.

get_aggregate iaddr returns the aggregate registered at virtual address iaddr.

  • raises [BCH_failure]

    if no aggregate is registered at iaddr.

val get_arm_jumptables : unit -> (BCHLibTypes.doubleword_int * BCHARMTypes.arm_jumptable_int) list