6This script generates a flow chart for a function from its disassembly information.
7Graphwiz must be installed on the system, and its bin directory in system PATH.
11import isystem.connect
as ic
12import isystem.flowChart
as fchart
13import isystem.diagutils
as diagutils
14import subprocess
as sp
21 cmgr = ic.ConnectionMgr()
22 cmgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
24 outFileName =
'flowChart.svg'
26 graphFileName = diagutils.createGraphFileName(outFileName,
'flow')
28 functionName =
'Func4'
30 isSingleCallNode =
True
32 isOpenInSystemViewer =
True
34 with open(graphFileName,
'w')
as outf:
36 graph = fchart.analyzeFunction(cmgr,
45 diagutils.createGraphImage(
'',
49 if isOpenInSystemViewer:
52 sp.check_call(
'start ' + outFileName, shell=
True)
55 sp.check_call(
'gwenview ' + outFileName, shell=
True)
60if __name__ ==
"__main__":