about summary refs log tree commit diff stats
path: root/test/arch/x86/qemu/testqemu.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2018-11-11 14:55:58 +0100
committerGitHub <noreply@github.com>2018-11-11 14:55:58 +0100
commitea9faf29639542b219b0343e2a87de3a81c9df4b (patch)
tree19ed391598d9e6a9098279f2f736abebc5a1e5b9 /test/arch/x86/qemu/testqemu.py
parent8d0f34b3049e31a9b789491d468cee0b72bfe24e (diff)
parent329f058141844a2e499140d61887324c824a2d5e (diff)
downloadmiasm-ea9faf29639542b219b0343e2a87de3a81c9df4b.tar.gz
miasm-ea9faf29639542b219b0343e2a87de3a81c9df4b.zip
Merge pull request #867 from serpilliere/vm_get_int
Vm get int
Diffstat (limited to 'test/arch/x86/qemu/testqemu.py')
-rw-r--r--test/arch/x86/qemu/testqemu.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/arch/x86/qemu/testqemu.py b/test/arch/x86/qemu/testqemu.py
index e6c487f2..dccd9c83 100644
--- a/test/arch/x86/qemu/testqemu.py
+++ b/test/arch/x86/qemu/testqemu.py
@@ -7,7 +7,6 @@ from pdb import pm
 from miasm2.analysis.sandbox import Sandbox_Linux_x86_32
 from miasm2.jitter.jitload import log_func
 from miasm2.jitter.csts import PAGE_READ, PAGE_WRITE
-from miasm2.core.utils import upck32
 
 # Utils
 def parse_fmt(s):
@@ -54,17 +53,17 @@ def xxx___printf_chk(jitter):
     i = 0
 
     for x in fmt_a:
-        a = upck32(jitter.vm.get_mem(esp + 8 + 4*i, 4))
+        a = jitter.vm.get_u32(esp + 8 + 4*i)
         if x == "s":
             a = jitter.get_str_ansi(a)
         elif x.lower() in ("x", 'd'):
             pass
         elif x.lower() in ("f", "l"):
-            a2 = upck32(jitter.vm.get_mem(esp + 8 + 4*(i+1), 4))
+            a2 = jitter.vm.get_u32(esp + 8 + 4*(i+1))
             a = struct.unpack("d", struct.pack("Q", a2 << 32 | a))[0]
             i += 1
         elif x.lower() == 'z':
-            a2 = upck32(jitter.vm.get_mem(esp + 8 + 4*(i+1), 4))
+            a2 = jitter.vm.get_u32(esp + 8 + 4*(i+1))
             a = a2 << 32 | a
             i += 1
         else: