winIDEA SDK
test_get_expression_address.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2# (c) TASKING Germany GmbH, 2023
3
4import isystem.connect as ic
5
6
7winidea_id = ''
8
9
10def test_getExpressionAddress():
11 connMgr = ic.ConnectionMgr()
12 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
13
14 addCtrl = ic.CAddressController(connMgr)
15
16 addData = addCtrl.getExpressionAddress("g_baseStruct.i_base")
17 hexAdd = hex(addData.getAddress())
18 memArea = addData.getMemArea()
19 print(f"Expression 'g_baseStruct.i_base' is at address '{hexAdd}' at memory area '{memArea}'.")
20
21
22if __name__ == "__main__":
23 test_getExpressionAddress()