From c4e4273c2d4e459eddc96c8ef0af0e5eff9c3f7e Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Thu, 29 Oct 2015 10:35:32 +0100 Subject: Expression: fix api --- miasm2/jitter/jitcore_python.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'miasm2/jitter/jitcore_python.py') diff --git a/miasm2/jitter/jitcore_python.py b/miasm2/jitter/jitcore_python.py index bc284825..96db3a2b 100644 --- a/miasm2/jitter/jitcore_python.py +++ b/miasm2/jitter/jitcore_python.py @@ -34,8 +34,8 @@ def update_engine_from_cpu(cpu, exec_engine): for symbol in exec_engine.symbols: if isinstance(symbol, m2_expr.ExprId): if hasattr(cpu, symbol.name): - value = m2_expr.ExprInt_fromsize(symbol.size, - getattr(cpu, symbol.name)) + value = m2_expr.ExprInt(getattr(cpu, symbol.name), + symbol.size) exec_engine.symbols.symbols_id[symbol] = value else: raise NotImplementedError("Type not handled: %s" % symbol) @@ -73,8 +73,8 @@ class JitCore_Python(jitcore.JitCore): size = expr_mem.size / 8 value = self.cpu.get_mem(addr, size) - return m2_expr.ExprInt_fromsize(expr_mem.size, - int(value[::-1].encode("hex"), 16)) + return m2_expr.ExprInt(int(value[::-1].encode("hex"), 16), + expr_mem.size) def func_write(self, symb_exec, dest, data, mem_cache): """Memory read wrapper for symbolic execution -- cgit 1.4.1