Module BCHMemoryReference

Printing

val memory_base_to_pretty : BCHLibTypes.memory_base_t -> CHPretty.pretty_t
val memory_offset_to_pretty : BCHLibTypes.memory_offset_t -> CHPretty.pretty_t
val memory_offset_to_string : BCHLibTypes.memory_offset_t -> string
val stack_offset_to_name : BCHLibTypes.memory_offset_t -> string
val realigned_stack_offset_to_name : BCHLibTypes.memory_offset_t -> string
val global_offset_to_name : int -> BCHLibTypes.memory_offset_t -> string

Comparison

val memory_offset_compare : BCHLibTypes.memory_offset_t -> BCHLibTypes.memory_offset_t -> int

Offset constructors

Offset predicates

val is_constant_offset : BCHLibTypes.memory_offset_t -> bool

Returns true if memoff consists entirely of constant (numerical) values.

val is_field_offset : BCHLibTypes.memory_offset_t -> bool

Returns true if memoff itself or one of its suboffsets is a field offset.

val is_index_offset : BCHLibTypes.memory_offset_t -> bool

Returns true if memoff itself or one of its suboffsets is an index offset.

val is_unknown_offset : BCHLibTypes.memory_offset_t -> bool

Returns true if memoff itself or one of its suboffsets is an unknown offset.

Offset constructors

Offset deconstructors

val get_constant_offsets : BCHLibTypes.memory_offset_t -> CHNumerical.numerical_t list

Returns a list of numerical offset and suboffsets.

  • raises [BCH_failure}

    if memoff is not a constant_offset.

val get_total_constant_offset : BCHLibTypes.memory_offset_t -> CHNumerical.numerical_t

Returns the sum of all numerical offsets in memoff.

  • raises [BCH_failure]

    if memoff is not a constant offset.

val get_index_offset_variables : BCHLibTypes.memory_offset_t -> CHLanguage.variable_t list

Returns the list of index variables in memoff (including suboffsets. Returns the empty list if memoff is not an index offset.

Memory reference manager