MCPcopy Create free account
hub / github.com/Vector35/debugger / read_memory

Method read_memory

api/python/debuggercontroller.py:588–605  ·  view source on GitHub ↗

Read memory from the target. One can also get the ``live_view`` BinaryView of the DebuggerController, and use ordinary read methods to read its content. :param address: address to read from :param size: number of bytes to read :return: always return

(self, address: int, size: int)

Source from the content-addressed store, hash-verified

586 return dbgcore.BNDebuggerGetStackPointer(self.handle)
587
588 def read_memory(self, address: int, size: int) -> binaryninja.DataBuffer:
589 """
590 Read memory from the target.
591
592 One can also get the ``live_view`` BinaryView of the DebuggerController, and use ordinary read methods to read
593 its content.
594
595 :param address: address to read from
596 :param size: number of bytes to read
597 :return: always returns a DataBuffer. When the operation fails, the size of the DataBuffer is 0x0
598 """
599 result = dbgcore.BNDebuggerReadMemory(self.handle, address, size)
600 if result is None:
601 return None
602 buffer = ctypes.cast(result, ctypes.POINTER(binaryninja.core.BNDataBuffer))
603 if buffer is None:
604 return None
605 return binaryninja.DataBuffer(handle=buffer)
606
607 def write_memory(self, address: int, buffer) -> bool:
608 """

Callers 1

Calls

no outgoing calls

Tested by 1