1
2
3
4import isystem.connect as ic
5
6
7winidea_id = ''
8
9
10def test_getSourceLineAtAddress():
11 connMgr = ic.ConnectionMgr()
12 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
13
14
15 ADDRESS = 0x08001F84
16
17
18
19 addCtrl = ic.CAddressController(connMgr)
20 srcPosData = addCtrl.getSourceLineAtAddress(ADDRESS)
21 print(f"Assignment location: '{srcPosData.getFileName()}::{srcPosData.getLineNumber()}'.")
22 print(f"Source file and line number can also be printed with `.toString()` function:")
23 print(srcPosData.toString())
24
25
26if __name__ == "__main__":
27 test_getSourceLineAtAddress()