package binsec

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = Dba.Instr.t
val set_successor : t -> int -> t

Modificators

val reset_successor : src_id:int -> dst_id:int -> t -> t
val reloc : ?outer:(Dba.id Dba.Jump_target.t -> Dba.id Dba.Jump_target.t) -> ?inner:(Dba.id -> Dba.id) -> t -> t
val successors : t -> Dba.id Dba.jump_target list

Properties and computations

variables t returns a couple defined * used representing sets of variable names defined and used at instruction t

temporaries t returns a couple defined * used representing sets of temporaries being defined and used

val outer_jumps : t -> Virtual_address.Set.t

outer_jumps t returns the set of virtual addresses this instruction may jump to.

This is a conservative, syntactic computation. Whenever an instruction can jump to a virtual address, this corresponds to a jump outside a DBA block. This function is used in Dhunk.outer_jumps.

val is_call : t -> bool

is_call t returns true if the instruction is a function call.

A DBA function call is encoded a jump (static or dynamic) with a Call tag which stores the return address.

val is_return : t -> bool
val generic_reset_successors : p:(Dba.id -> bool) -> f:(Dba.id -> Dba.id) -> Dba.Instr.t -> Dba.Instr.t

generic_reset_successors ~p ~f i applies the transformation f on the successor index of i if predicate p is true