winIDEA SDK
Loading...
Searching...
No Matches
test_get_stack_frame_info.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_getStackFrameInfo():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
dataCtrl2 = ic.CDataController2(connMgr)
print("Getting stack data of active frames...")
stackData = dataCtrl2.getStackFrameInfo(True, True)
try:
stackData: ic.IStackFrameInfo
stackFrames = stackData.StackFrames()
stackFrames: ic.IVectorStackFrames
for index in range(stackFrames.size()):
stackFrame = stackFrames.at(index)
print(f"Frame {index}:")
print(f"\tFile name: {stackFrame.FileName()}")
print(f"\tLine number: {stackFrame.LineNumber()}")
print(f"\tFunction name: {stackFrame.FunctionName()}")
print(f"\tAddress: {stackFrame.Address()}")
print(f"\tMemory area: {stackFrame.MemoryArea()}")
print(f"\tPartition: {stackFrame.Partition()}")
finally:
dataCtrl2.release(stackData)
if __name__ == "__main__":
test_getStackFrameInfo()