winIDEA SDK
test_get_function_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_getFunctionAddress():
11 conn_mgr = ic.ConnectionMgr()
12 conn_mgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
13
14 addr_ctrl = ic.CAddressController(conn_mgr)
15 func_addr = addr_ctrl.getFunctionAddress("main")
16 mem_area = func_addr.getMemArea()
17 print(f"Function 'main' is at address '{hex(func_addr.getAddress())}', mem. area '{mem_area}'.")
18
19
20if __name__ == "__main__":
21 test_getFunctionAddress()