mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 13:48:29 +00:00
memdump.py: add simple memory dumper
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
e5caf91d79
commit
c648a517e3
1 changed files with 19 additions and 0 deletions
19
proxyclient/memdump.py
Normal file
19
proxyclient/memdump.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
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
|
Loading…
Add table
Reference in a new issue