8.8.1.1.2.2.3. Callstack¶
- class Callstack¶
- fetch(maxLevels=None) CallstackResult¶
Fetches the callstack.
stack = session.callstack.fetch() # For each frame in the callstack, print the info about the frame for i, frame in enumerate(stack): functionName = frame.get("functionName", "<symbol is not available>") if "sourceLine" in frame: src = frame["sourceLine"] print(f"{i} {functionName} at {src['path']}:{src['line']}:{src['column']} PC = {frame['pc']}") else: print(f"{i} {functionName} PC = {frame['pc']}")
- Parameters:
maxLevels (int) -- (optional) The maximum number of frames to fetch. Defaults to all frames.
- Return type: