winIDEA SDK
Loading...
Searching...
No Matches
test_get_symbol_at_address.py
# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
# (c) TASKING Germany GmbH, 2023
import isystem.connect as ic
winidea_id = ''
def test_getSymbolAtAddress():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
# for STM32 use
ADDRESS = 0x200019AC
# for TC399xe use
# ADDRESS = 0xD0001020
addrCtrl = ic.CAddressController(connMgr)
# 0 = main memory area (the only application)
varName = addrCtrl.getSymbolAtAddress(ic.IConnectDebug.sVariables, 0, ADDRESS)
print(f"At address '{hex(ADDRESS)}' is variable '{varName}'.")
execCtrl = ic.CExecutionController(connMgr)
status = execCtrl.getCPUStatus()
symbol = addrCtrl.getSymbolAtAddress(ic.IConnectDebug.sFunctions,
status.getExecutionArea(),
status.getExecutionPoint(),
ic.IConnectDebug.sScopeWide)
print(f'Function at execution point: {symbol}')
if __name__ == "__main__":
test_getSymbolAtAddress()