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

Method read_code_bytes

pydevd_attach_to_process/winappdbg/thread.py:1478–1493  ·  view source on GitHub ↗

Tries to read some bytes of the code currently being executed. @type size: int @param size: Number of bytes to read. @type offset: int @param offset: Offset from the program counter to begin reading. @rtype: str @return: Bytes read from

(self, size=128, offset=0)

Source from the content-addressed store, hash-verified

1476 return tuple([stackData.__getattribute__(name) for (name, type) in stackData._fields_])
1477
1478 def read_code_bytes(self, size=128, offset=0):
1479 """
1480 Tries to read some bytes of the code currently being executed.
1481
1482 @type size: int
1483 @param size: Number of bytes to read.
1484
1485 @type offset: int
1486 @param offset: Offset from the program counter to begin reading.
1487
1488 @rtype: str
1489 @return: Bytes read from the process memory.
1490
1491 @raise WindowsError: Could not read the requested data.
1492 """
1493 return self.get_process().read(self.get_pc() + offset, size)
1494
1495 def peek_code_bytes(self, size=128, offset=0):
1496 """

Callers

nothing calls this directly

Calls 3

get_processMethod · 0.95
get_pcMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected