m1n1/proxyclient/memdump.py
Hector Martin c648a517e3 memdump.py: add simple memory dumper
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-01-23 22:43:21 +09:00

19 lines
302 B
Python

import sys
from setup import *
p = 0x800000000
limit = u.base
block = 0x40000
while p < limit:
f = "mem/0x%x.bin" % p
if os.path.exists(f):
p += block
continue
print("dumping 0x%x..." % p)
data = iface.readmem(p, block)
open(f, "wb").write(data)
p += block