From 7d99b598f1603a862f507d7fb43d39ec1723d461 Mon Sep 17 00:00:00 2001 From: esanfelix Date: Tue, 20 Sep 2016 10:29:21 +0200 Subject: [PATCH] Fix #638 for python sample too --- bindings/python/sample_arm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/python/sample_arm.py b/bindings/python/sample_arm.py index a8491d19..e910defc 100755 --- a/bindings/python/sample_arm.py +++ b/bindings/python/sample_arm.py @@ -85,7 +85,8 @@ def test_thumb(): mu.hook_add(UC_HOOK_CODE, hook_code) # emulate machine code in infinite time - mu.emu_start(ADDRESS, ADDRESS + len(THUMB_CODE)) + # Note we start at ADDRESS | 1 to indicate THUMB mode. + mu.emu_start(ADDRESS | 1, ADDRESS + len(THUMB_CODE)) # now print out some registers print(">>> Emulation done. Below is the CPU context")