MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / get_stack_frame

Method get_stack_frame

pydevd_attach_to_process/winappdbg/thread.py:1299–1323  ·  view source on GitHub ↗

Reads the contents of the current stack frame. Only works for functions with standard prologue and epilogue. @type max_size: int @param max_size: (Optional) Maximum amount of bytes to read. @rtype: str @return: Stack frame data. May no

(self, max_size=None)

Source from the content-addressed store, hash-verified

1297 return (sp, fp)
1298
1299 def get_stack_frame(self, max_size=None):
1300 """
1301 Reads the contents of the current stack frame.
1302 Only works for functions with standard prologue and epilogue.
1303
1304 @type max_size: int
1305 @param max_size: (Optional) Maximum amount of bytes to read.
1306
1307 @rtype: str
1308 @return: Stack frame data.
1309 May not be accurate, depending on the compiler used.
1310 May return an empty string.
1311
1312 @raise RuntimeError: The stack frame is invalid,
1313 or the function doesn't have a standard prologue
1314 and epilogue.
1315
1316 @raise WindowsError: An error occured when getting the thread context
1317 or reading data from the process memory.
1318 """
1319 sp, fp = self.get_stack_frame_range()
1320 size = fp - sp
1321 if max_size and size > max_size:
1322 size = max_size
1323 return self.get_process().peek(sp, size)
1324
1325 def read_stack_data(self, size=128, offset=0):
1326 """

Callers 1

fetch_extra_dataMethod · 0.80

Calls 3

get_stack_frame_rangeMethod · 0.95
get_processMethod · 0.95
peekMethod · 0.80

Tested by

no test coverage detected