mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 06:05:31 +00:00
10 lines
317 B
Python
10 lines
317 B
Python
|
from unicorn import *
|
||
|
uc = Uc(UC_ARCH_ARM, UC_MODE_ARM)
|
||
|
uc.mem_map(0x1000, 0x1000)
|
||
|
uc.mem_write(0x1000, '00c000e3'.decode('hex'))
|
||
|
def hook_block(uc, addr, *args):
|
||
|
print 'enter block 0x%04x' % addr
|
||
|
uc.hook_add(UC_HOOK_BLOCK, hook_block)
|
||
|
print 'block should only run once'
|
||
|
uc.emu_start(0x1000, 0x1004, timeout=250)
|