diff options
| author | Florent <florent.monjalet@gmail.com> | 2015-10-29 15:47:55 +0100 |
|---|---|---|
| committer | Florent <florent.monjalet@gmail.com> | 2015-10-29 15:47:55 +0100 |
| commit | fefb609f7ed8267815e3ab4b7467a8fada7040b8 (patch) | |
| tree | 03b82bcf93d36fa36f7cdee28b36eba3c7d59d40 /miasm2/jitter/jitcore_python.py | |
| parent | 967be0c4e0f8d32f6bf3e8aa9f85d0abc9ab95da (diff) | |
| parent | c4e4273c2d4e459eddc96c8ef0af0e5eff9c3f7e (diff) | |
| download | miasm-fefb609f7ed8267815e3ab4b7467a8fada7040b8.tar.gz miasm-fefb609f7ed8267815e3ab4b7467a8fada7040b8.zip | |
Merge pull request #250 from serpilliere/ExprInt_api
Expression: normalize ExprInt api
Diffstat (limited to 'miasm2/jitter/jitcore_python.py')
| -rw-r--r-- | miasm2/jitter/jitcore_python.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 |