miasm
Reverse engineering framework
miasm.ir.ir.IRCFG Class Reference
Inheritance diagram for miasm.ir.ir.IRCFG:
Collaboration diagram for miasm.ir.ir.IRCFG:

Public Member Functions

def __init__ (self, irdst, loc_db, blocks=None, *args, **kwargs)
 
def IRDst (self)
 
def blocks (self)
 
def add_irblock (self, irblock)
 
def node2lines (self, node)
 
def edge_attr (self, src, dst)
 
def node_attr (self, node)
 
def dot (self, offset=False)
 
def get_loc_key (self, addr)
 
def get_or_create_loc_key (self, addr)
 
def get_block (self, addr)
 
def getby_offset (self, offset)
 
def simplify (self, simplifier)
 
def dst_trackback (self, irb)
 
- Public Member Functions inherited from miasm.core.graph.DiGraph
def __init__ (self)
 
def __repr__ (self)
 
def nodes (self)
 
def edges (self)
 
def merge (self, graph)
 
def __add__ (self, graph)
 
def copy (self)
 
def __eq__ (self, graph)
 
def __ne__ (self, other)
 
def add_node (self, node)
 
def del_node (self, node)
 
def add_edge (self, src, dst)
 
def add_uniq_edge (self, src, dst)
 
def del_edge (self, src, dst)
 
def discard_edge (self, src, dst)
 
def predecessors_iter (self, node)
 
def predecessors (self, node)
 
def successors_iter (self, node)
 
def successors (self, node)
 
def leaves_iter (self)
 
def leaves (self)
 
def heads_iter (self)
 
def heads (self)
 
def find_path (self, src, dst, cycles_count=0, done=None)
 
def find_path_from_src (self, src, dst, cycles_count=0, done=None)
 
def nodeid (self, node)
 
def dot (self)
 
def predecessors_stop_node_iter (self, node, head)
 
def reachable_sons (self, head)
 
def reachable_parents (self, leaf)
 
def reachable_parents_stop_node (self, leaf, head)
 
def compute_dominators (self, head)
 
def compute_postdominators (self, leaf)
 
def compute_dominator_tree (self, head)
 
def walk_dominators (self, node, dominators)
 
def walk_postdominators (self, node, postdominators)
 
def compute_immediate_dominators (self, head)
 
def compute_immediate_postdominators (self, tail)
 
def compute_dominance_frontier (self, head)
 
def walk_breadth_first_forward (self, head)
 
def walk_depth_first_forward (self, head)
 
def walk_breadth_first_backward (self, head)
 
def walk_depth_first_backward (self, head)
 
def has_loop (self)
 
def compute_natural_loops (self, head)
 
def compute_back_edges (self, head)
 
def compute_strongly_connected_components (self)
 
def compute_weakly_connected_components (self)
 
def replace_node (self, node, new_node)
 

Public Attributes

 loc_db
 

Additional Inherited Members

- Static Public Attributes inherited from miasm.core.graph.DiGraph
 DotCellDescription
 

Detailed Description

DiGraph for IR instances

Constructor & Destructor Documentation

◆ __init__()

def miasm.ir.ir.IRCFG.__init__ (   self,
  irdst,
  loc_db,
  blocks = None,
args,
**  kwargs 
)
Instantiate a IRCFG
@loc_db: LocationDB instance
@blocks: IR blocks

Member Function Documentation

◆ add_irblock()

def miasm.ir.ir.IRCFG.add_irblock (   self,
  irblock 
)
Add the @irblock to the current IRCFG
@irblock: IRBlock instance
Here is the call graph for this function:

◆ blocks()

def miasm.ir.ir.IRCFG.blocks (   self)
Here is the caller graph for this function:

◆ dot()

def miasm.ir.ir.IRCFG.dot (   self,
  offset = False 
)
@offset: (optional) if set, add the corresponding line number in each
node

◆ dst_trackback()

def miasm.ir.ir.IRCFG.dst_trackback (   self,
  irb 
)
Naive backtracking of IRDst
@irb: irbloc instance
Here is the call graph for this function:
Here is the caller graph for this function:

◆ edge_attr()

def miasm.ir.ir.IRCFG.edge_attr (   self,
  src,
  dst 
)
Return a dictionary of attributes for the edge between @src and @dst
@src: the source node of the edge
@dst: the destination node of the edge

Reimplemented from miasm.core.graph.DiGraph.

◆ get_block()

def miasm.ir.ir.IRCFG.get_block (   self,
  addr 
)
Returns the irbloc associated to an ExprId/ExprInt/loc_key/int
@addr: an ExprId/ExprInt/loc_key/int
Here is the call graph for this function:

◆ get_loc_key()

def miasm.ir.ir.IRCFG.get_loc_key (   self,
  addr 
)
Transforms an ExprId/ExprInt/loc_key/int into a loc_key
@addr: an ExprId/ExprInt/loc_key/int
Here is the caller graph for this function:

◆ get_or_create_loc_key()

def miasm.ir.ir.IRCFG.get_or_create_loc_key (   self,
  addr 
)
Transforms an ExprId/ExprInt/loc_key/int into a loc_key
If the offset @addr is not in the LocationDB, create it
@addr: an ExprId/ExprInt/loc_key/int
Here is the call graph for this function:

◆ getby_offset()

def miasm.ir.ir.IRCFG.getby_offset (   self,
  offset 
)
Return the set of loc_keys of irblocks containing @offset
@offset: address
Here is the call graph for this function:

◆ IRDst()

def miasm.ir.ir.IRCFG.IRDst (   self)

◆ node2lines()

def miasm.ir.ir.IRCFG.node2lines (   self,
  node 
)
Returns an iterator on cells of the dot @node.
A DotCellDescription or a list of DotCellDescription are accepted
@node: a node of the graph

Reimplemented from miasm.core.graph.DiGraph.

◆ node_attr()

def miasm.ir.ir.IRCFG.node_attr (   self,
  node 
)
Returns a dictionary of the @node's attributes
@node: a node of the graph

Reimplemented from miasm.core.graph.DiGraph.

◆ simplify()

def miasm.ir.ir.IRCFG.simplify (   self,
  simplifier 
)
Simplify expressions in each irblocks
@simplifier: ExpressionSimplifier instance
Here is the call graph for this function:

Member Data Documentation

◆ loc_db

miasm.ir.ir.IRCFG.loc_db

The documentation for this class was generated from the following file: