5import isystem.connect
as ic
11def printVariables(partitionIdx, dataCtrl):
12 vars = ic.VariableVector()
13 dataCtrl.getVariables(partitionIdx, vars)
15 print(
' Var name: ', var.getName())
16 print(
' Var type: ', var.getType())
17 print(
' ------------------')
20def printLabels(partitionIdx, dataCtrl):
21 labels = ic.VariableVector()
22 dataCtrl.getLabels(partitionIdx, labels)
24 print(
' Label name: ', label.getName())
25 print(
' Label type: ', label.getType())
26 print(
' ------------------')
29def printModules(partitionIdx, dataCtrl):
30 modules = ic.ModuleVector()
31 dataCtrl.getModules(partitionIdx, modules)
32 for module
in modules:
33 print(
' Module name: ', module.getName())
34 print(
' Module path: ', module.getPath())
35 print(
' ------------------')
38def printFunctions(partitionIdx, dataCtrl):
39 functions = ic.FunctionVector()
40 dataCtrl.getFunctions(partitionIdx, functions)
42 for function
in functions:
43 print(
' Function: ', function.getName())
44 print(
' Scope: ', function.getScope())
45 print(
' Type: ', function.getReturnType())
46 print(
' Module idx: ', function.getModuleIndex())
48 params = function.getParameters()
50 print(
' Name: ', param.getName())
51 print(
' Type: ', param.getType())
54 print(
' ------------------')
57def printTypes(partitionIdx, dataCtrl):
58 types = ic.TypeVector()
59 dataCtrl.getTypes(partitionIdx, types)
61 print(
' Type name: ', ctype.getName())
62 stype = ctype.getType()
66 print(
' type: ', stype.m_byType)
67 print(
' type2: ', stype.m_byType2)
68 print(
' bitSize: ', stype.m_byBitSize)
69 print(
' ------------------')
72def printTypedefs(partitionIdx, dataCtrl):
73 typedefs = ic.TypedefVector()
74 dataCtrl.getTypes(partitionIdx, typedefs)
75 for typedef
in typedefs:
76 print(
' Typedef name: ', typedef.getTypedefName())
77 print(
' Type name: ', typedef.getTypeName())
78 print(
' ------------------')
81cmgr = ic.ConnectionMgr()
82cmgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
83debugCtrl = ic.CDebugFacade(cmgr)
87dataCtrl = ic.CDataController(cmgr)
91dlFileNames = ic.StrVector()
92dataCtrl.getPartitions(paths, dlFileNames)
95for dlFile
in dlFileNames:
96 print(
'Download file: ', dlFile)
97 printVariables(partitionIdx, dataCtrl)
98 printLabels(partitionIdx, dataCtrl)
99 printModules(partitionIdx, dataCtrl)
100 printFunctions(partitionIdx, dataCtrl)
101 printTypes(partitionIdx, dataCtrl)
102 printTypedefs(partitionIdx, dataCtrl)