winIDEA SDK
test_get_function_address.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_getFunctionAddress():
12 conn_mgr = ic.ConnectionMgr()
13 conn_mgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 addr_ctrl = ic.CAddressController(conn_mgr)
16 func_addr = addr_ctrl.getFunctionAddress("main")
17 mem_area = func_addr.getMemArea()
18 print(f"Function 'main' is at address '{hex(func_addr.getAddress())}', mem. area '{mem_area}'.")
19
20
21if __name__ == "__main__":
22 test_getFunctionAddress()