Package Libs :: Module libcontrolflow :: Class ControlFlowAnalysis
[hide private]
[frames] | no frames]

Class ControlFlowAnalysis

source code

Instance Methods [hide private]
  __init__(self, imm, address, domtree=False)
LIST findNaturalLoops(self)
This function finds Natural Loops inside a function, using the information provided by dominator tree class.

Method Details [hide private]

__init__(self, imm, address, domtree=False)
(Constructor)

source code 
Parameters:
  • imm (Debbuger OBJECT) - Debbuger
  • address (DWORD) - function start address
  • domtree (OBJECT|False) - Optionally you can provide a DominatorTree instance (mainly for testing purposes).

findNaturalLoops(self)

source code 
This function finds Natural Loops inside a function, using the information provided by dominator tree class.
Returns: LIST
A list of loops, each with this structure: [ start, end, nodes ] start: address of node receiving the back edge end: address of node which has the back edge node: list of node's addresses involved in this loop