From c73149d581f8206143d2551ceac19d6e144a2e6a Mon Sep 17 00:00:00 2001 From: Ryan Hileman Date: Mon, 7 Sep 2015 08:57:09 -0700 Subject: [PATCH] add regression for #114 --- regress/arm_movr12_hang.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 regress/arm_movr12_hang.py diff --git a/regress/arm_movr12_hang.py b/regress/arm_movr12_hang.py new file mode 100644 index 00000000..1ff403c4 --- /dev/null +++ b/regress/arm_movr12_hang.py @@ -0,0 +1,9 @@ +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)