6TODO_MK: move one example for sFunctions to test_getSymbolAtAddress, then delete this file.
8This script demonstrates obtaining of function at the given memory
12import isystem.connect
as ic
20cmgr = ic.ConnectionMgr()
21cmgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
23debugCtrl = ic.CDebugFacade(cmgr)
26debugCtrl.runUntilFunction(
'main', ic.CExecutionController.TOUT_10s)
28status = debugCtrl.getCPUStatus()
32print(
'Current function, default scope: ' + debugCtrl.getSymbolAtAddress(ic.IConnectDebug.sFunctions,
33 status.getExecutionArea(),
34 status.getExecutionPoint()))
36print(
'Current function, exact scope: ' + debugCtrl.getSymbolAtAddress(ic.IConnectDebug.sFunctions,
37 status.getExecutionArea(),
38 status.getExecutionPoint(),
39 ic.IConnectDebug.sScopeExact))
41debugCtrl.stepOverHigh()
42debugCtrl.stepOverHigh()
43debugCtrl.stepOverHigh()
45status = debugCtrl.getCPUStatus()
49print(
'Current function, default scope: ' + debugCtrl.getSymbolAtAddress(ic.IConnectDebug.sFunctions,
50 status.getExecutionArea(),
51 status.getExecutionPoint()))
53print(
'Current function, exact scope: ' + debugCtrl.getSymbolAtAddress(ic.IConnectDebug.sFunctions,
54 status.getExecutionArea(),
55 status.getExecutionPoint(),
56 ic.IConnectDebug.sScopeExact))
58print(
'Current function, narrow scope: ' + debugCtrl.getSymbolAtAddress(ic.IConnectDebug.sFunctions,
59 status.getExecutionArea(),
60 status.getExecutionPoint(),
61 ic.IConnectDebug.sScopeNarrow))
63print(
'Current function, wide scope: ' + debugCtrl.getSymbolAtAddress(ic.IConnectDebug.sFunctions,
64 status.getExecutionArea(),
65 status.getExecutionPoint(),
66 ic.IConnectDebug.sScopeWide))