MCPcopy Create free account
hub / github.com/qilingframework/qiling / save

Method save

qiling/os/memory.py:308–325  ·  view source on GitHub ↗

Save entire memory content.

(self)

Source from the content-addressed store, hash-verified

306 return (value + alignment - 1) & ~(alignment - 1)
307
308 def save(self):
309 """Save entire memory content.
310 """
311
312 mem_dict = {
313 "ram" : [],
314 "mmio" : []
315 }
316
317 for lbound, ubound, perm, label, mmio_ctx in self.map_info:
318 if mmio_ctx is None:
319 key, data = 'ram', bytes(self.read(lbound, ubound - lbound))
320 else:
321 key, data = 'mmio', mmio_ctx
322
323 mem_dict[key].append((lbound, ubound, perm, label, data))
324
325 return mem_dict
326
327 def restore(self, mem_dict):
328 """Restore saved memory content.

Callers

nothing calls this directly

Calls 2

readMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected