B2R2


DisasmLens Module

A graph lens for obtaining DisasmCFG.

Functions and values

Function or value Description

DisasmLens.addEdge vMap g (src, dst) e

Full Usage: DisasmLens.addEdge vMap g (src, dst) e

Parameters:
Returns: DiGraph<DisasmBasicBlock, 'a>
vMap : DisasmVMap
g : DiGraph<DisasmBasicBlock, 'a>
src : Addr
dst : Addr
e : 'a
Returns: DiGraph<DisasmBasicBlock, 'a>

DisasmLens.addVertex (g, vMap) addr instrs

Full Usage: DisasmLens.addVertex (g, vMap) addr instrs

Parameters:
Returns: DiGraph<DisasmBasicBlock, 'a> * DisasmVMap
g : DiGraph<DisasmBasicBlock, 'a>
vMap : DisasmVMap
addr : Addr
instrs : Instruction[]
Returns: DiGraph<DisasmBasicBlock, 'a> * DisasmVMap

DisasmLens.canBeMerged ircfg v

Full Usage: DisasmLens.canBeMerged ircfg v

Parameters:
Returns: bool
ircfg : DiGraph<'a, CFGEdgeKind>
v : Vertex<'a>
Returns: bool

DisasmLens.filter codeMgr g root

Full Usage: DisasmLens.filter codeMgr g root

Parameters:
Returns: DiGraph<DisasmBasicBlock, CFGEdgeKind> * DisasmVertex
codeMgr : CodeManager
g : DiGraph<IRBasicBlock, CFGEdgeKind>
root : IRVertex
Returns: DiGraph<DisasmBasicBlock, CFGEdgeKind> * DisasmVertex

DisasmLens.findBlockStart blockInfos addr

Full Usage: DisasmLens.findBlockStart blockInfos addr

Parameters:
Returns: 'a
blockInfos : Map<'a, (AddrRange * 'b)>
addr : Addr
Returns: 'a

DisasmLens.getEdgeInfos blockInfos ircfg

Full Usage: DisasmLens.getEdgeInfos blockInfos ircfg

Parameters:
Returns: Map<(Addr * Addr), CFGEdgeKind>
blockInfos : Map<Addr, (AddrRange * 'a)>
ircfg : DiGraph<IRBasicBlock, CFGEdgeKind>
Returns: Map<(Addr * Addr), CFGEdgeKind>

DisasmLens.getMergeMap blockInfos ircfg

Full Usage: DisasmLens.getMergeMap blockInfos ircfg

Parameters:
Returns: Map<'a, Addr>
blockInfos : Map<'a, (AddrRange * 'b)>
ircfg : DiGraph<IRBasicBlock, CFGEdgeKind>
Returns: Map<'a, Addr>

DisasmLens.mergeInfos codeMgr blockInfos edgeInfos mergeMap

Full Usage: DisasmLens.mergeInfos codeMgr blockInfos edgeInfos mergeMap

Parameters:
Returns: Map<'a, Instruction[]> * Map<('a * 'c), 'd>
codeMgr : CodeManager
blockInfos : Map<'a, ('b * Set<Addr>)>
edgeInfos : Map<('a * 'c), 'd>
mergeMap : Map<'a, 'a>
Returns: Map<'a, Instruction[]> * Map<('a * 'c), 'd>

DisasmLens.mergeInfosLoop codeMgr blockInfo vertexInfo edgeInfo mergeMap _arg1

Full Usage: DisasmLens.mergeInfosLoop codeMgr blockInfo vertexInfo edgeInfo mergeMap _arg1

Parameters:
Returns: Map<'a, Instruction[]> * Map<('a * 'c), 'd>
codeMgr : CodeManager
blockInfo : Map<'a, ('b * Set<Addr>)>
vertexInfo : Map<'a, Instruction[]>
edgeInfo : Map<('a * 'c), 'd>
mergeMap : Map<'a, 'a>
_arg1 : 'a list
Returns: Map<'a, Instruction[]> * Map<('a * 'c), 'd>

DisasmLens.resolveMerge codeMgr blockInfo vertexInfo edgeInfo mergeMap addr next addrs

Full Usage: DisasmLens.resolveMerge codeMgr blockInfo vertexInfo edgeInfo mergeMap addr next addrs

Parameters:
Returns: Map<'a, Instruction[]> * Map<('a * 'c), 'd> * Map<'a, 'a> * 'a list
codeMgr : CodeManager
blockInfo : Map<'a, ('b * Set<Addr>)>
vertexInfo : Map<'a, Instruction[]>
edgeInfo : Map<('a * 'c), 'd>
mergeMap : Map<'a, 'a>
addr : 'a
next : 'a
addrs : 'a list
Returns: Map<'a, Instruction[]> * Map<('a * 'c), 'd> * Map<'a, 'a> * 'a list