B2R2


SSACFG Module

Functions and values

Function or value Description

SSACFG.findReachingDef v targetVarKind

Full Usage: SSACFG.findReachingDef v targetVarKind

Parameters:
Returns: Stmt option

Find the reaching definition of the given variable kind (targetVarKind) at the entry of node v. We simply follow the dominator tree of the given SSACFG until we find a definition.

v : SSAVertex
targetVarKind : VariableKind
Returns: Stmt option

SSACFG.findVertexByAddr ssaCFG addr

Full Usage: SSACFG.findVertexByAddr ssaCFG addr

Parameters:
Returns: Vertex<SSABasicBlock>

Find SSAVertex that includes the given instruction address.

ssaCFG : DiGraph<SSABasicBlock, 'a>
addr : Addr
Returns: Vertex<SSABasicBlock>

SSACFG.init _arg1

Full Usage: SSACFG.init _arg1

Parameters:
Returns: DiGraph<SSABasicBlock, CFGEdgeKind>

Initialize SSACFG based on the implementation type.

_arg1 : GraphImplementationType
Returns: DiGraph<SSABasicBlock, CFGEdgeKind>

SSACFG.installPhis vertices ssaCFG ssaRoot

Full Usage: SSACFG.installPhis vertices ssaCFG ssaRoot

Parameters:

Add phis and rename all the variables.

vertices : seq<SSAVertex>
ssaCFG : DiGraph<SSABasicBlock, 'a>
ssaRoot : Vertex<SSABasicBlock>

SSACFG.ofIRCFG hdl g root

Full Usage: SSACFG.ofIRCFG hdl g root

Parameters:
Returns: DiGraph<SSABasicBlock, CFGEdgeKind> * Vertex<SSABasicBlock>

Convert IRCFG to an SSA CFG.

hdl : BinHandle
g : DiGraph<IRBasicBlock, CFGEdgeKind>
root : Vertex<IRBasicBlock>
Returns: DiGraph<SSABasicBlock, CFGEdgeKind> * Vertex<SSABasicBlock>