mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-03 15:25:46 +00:00
add regress/memmap.py
This commit is contained in:
parent
9b36b47304
commit
3e5ebc58a0
14
regress/memmap.py
Executable file
14
regress/memmap.py
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
# By Ryan Hileman, issue #9
|
||||||
|
|
||||||
|
# this prints out 2 lines and the contents must be the same
|
||||||
|
|
||||||
|
from unicorn import *
|
||||||
|
uc = Uc(UC_ARCH_X86, UC_MODE_64)
|
||||||
|
|
||||||
|
uc.mem_map(0x8048000, 0x2000)
|
||||||
|
uc.mem_write(0x8048000, 'test')
|
||||||
|
print 1, str(uc.mem_read(0x8048000, 4)).encode('hex')
|
||||||
|
|
||||||
|
uc.mem_map(0x804a000, 0x8000)
|
||||||
|
print 2, str(uc.mem_read(0x8048000, 4)).encode('hex')
|
Loading…
Reference in a new issue