10import isystem.connect
as ic
17def test_resetAndRun():
18 connMgr = ic.ConnectionMgr()
19 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
21 execCtrl = ic.CExecutionController(connMgr)
22 sessionCtrl = ic.CSessionCtrl(connMgr)
23 addCtrl = ic.CAddressController(connMgr)
24 bpCtrl = ic.CBreakpointController(connMgr)
26 sessionCtrl.begin_prepare()
27 execCtrl.runUntilFunction(
'main')
29 print(
"`resetAndRun` the CPU without timeout (not expecting `STOP` state)...")
30 execCtrl.resetAndRun()
32 address = addCtrl.getFunctionAddress(
"main").getAddress()
33 print(f
"Setting BP at function 'main': {hex(address)}")
34 bpCtrl.setBP(0, address)
35 sessionCtrl.begin_reset()
37 print(
"`resetAndRun` the CPU with 1 sec timeout (expecting stop at function 'main')...")
38 if execCtrl.resetAndRun(ic.CExecutionController.TOUT_1s) == 0:
46if __name__ ==
"__main__":