Esempio n. 1
0
 def read_struct(self, address, struct):
     size = self._ctypes.sizeof(struct)
     instance = struct.from_buffer_copy(self.read_bytes(address, size))
     instance._orig_address_ = address
     return instance
Esempio n. 2
0
 def read_struct(self, addr, struct):
     size = self._target_platform.get_target_ctypes().sizeof(struct)
     instance = struct.from_buffer_copy(self._backend.zread(addr, size))
     instance._orig_address_ = addr
     return instance
Esempio n. 3
0
 def read_struct(self, addr, struct):
     size = self._ctypes.sizeof(struct)
     self._backend.seek(self.offset + addr - self.start, 0)
     instance = struct.from_buffer_copy(self._backend.read(size))
     instance._orig_address_ = addr
     return instance
Esempio n. 4
0
 def read_struct(self, addr, struct):
     size = self._ctypes.sizeof(struct)
     self._backend.seek(self.offset + addr - self.start, 0)
     instance = struct.from_buffer_copy(self._backend.read(size))
     instance._orig_address_ = addr
     return instance
Esempio n. 5
0
 def read_struct(self, addr, struct):
     size = self._target_platform.get_target_ctypes().sizeof(struct)
     instance = struct.from_buffer_copy(self._backend.read(addr, size))
     instance._orig_address_ = addr
     return instance
Esempio n. 6
0
 def read_struct(self, addr, struct):
     size = self._ctypes.sizeof(struct)
     instance = struct.from_buffer_copy(self._backend.zread(addr, size))
     instance._orig_address_ = addr
     return instance
Esempio n. 7
0
 def read_struct(self, address, struct):
     size = self._ctypes.sizeof(struct)
     instance = struct.from_buffer_copy(self.read_bytes(address, size))
     instance._orig_address_ = address
     return instance