miasm
Reverse engineering framework
miasm.analysis.cst_propag Namespace Reference

Classes

class  SymbExecState
 
class  SymbExecStateFix
 

Functions

def add_state (ircfg, todo, states, addr, state)
 
def is_expr_cst (ir_arch, expr)
 
def compute_cst_propagation_states (ir_arch, ircfg, init_addr, init_infos)
 
def propagate_cst_expr (ir_arch, ircfg, addr, init_infos)
 

Variables

 LOG_CST_PROPAG = logging.getLogger("cst_propag")
 
 CONSOLE_HANDLER = logging.StreamHandler()
 

Function Documentation

◆ add_state()

def miasm.analysis.cst_propag.add_state (   ircfg,
  todo,
  states,
  addr,
  state 
)
Add or merge the computed @state for the block at @addr. Update @todo
@todo: modified block set
@states: dictionary linking a label to its entering state.
@addr: address of the considered block
@state: computed state
Here is the caller graph for this function:

◆ compute_cst_propagation_states()

def miasm.analysis.cst_propag.compute_cst_propagation_states (   ir_arch,
  ircfg,
  init_addr,
  init_infos 
)
Propagate "constant expressions" in a function.
The attribute "constant expression" is true if the expression is based on
constants or "init" regs values.

@ir_arch: IntermediateRepresentation instance
@init_addr: analysis start address
@init_infos: dictionary linking expressions to their values at @init_addr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_expr_cst()

def miasm.analysis.cst_propag.is_expr_cst (   ir_arch,
  expr 
)
Return true if @expr is only composed of ExprInt and init_regs
@ir_arch: IR instance
@expr: Expression to test

◆ propagate_cst_expr()

def miasm.analysis.cst_propag.propagate_cst_expr (   ir_arch,
  ircfg,
  addr,
  init_infos 
)
Propagate "constant expressions" in a @ir_arch.
The attribute "constant expression" is true if the expression is based on
constants or "init" regs values.

@ir_arch: IntermediateRepresentation instance
@addr: analysis start address
@init_infos: dictionary linking expressions to their values at @init_addr

Returns a mapping between replaced Expression and their new values.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ CONSOLE_HANDLER

miasm.analysis.cst_propag.CONSOLE_HANDLER = logging.StreamHandler()

◆ LOG_CST_PROPAG

miasm.analysis.cst_propag.LOG_CST_PROPAG = logging.getLogger("cst_propag")