diff options
Diffstat (limited to 'miasm2/core')
| -rw-r--r-- | miasm2/core/asmbloc.py | 2 | ||||
| -rw-r--r-- | miasm2/core/cpu.py | 8 | ||||
| -rw-r--r-- | miasm2/core/parse_asm.py | 1 |
3 files changed, 5 insertions, 6 deletions
diff --git a/miasm2/core/asmbloc.py b/miasm2/core/asmbloc.py index ee93cba7..cb8423f6 100644 --- a/miasm2/core/asmbloc.py +++ b/miasm2/core/asmbloc.py @@ -219,7 +219,7 @@ class asm_bloc: l = self.lines[i] if l.splitflow() or l.breakflow(): raise NotImplementedError('not fully functional') - return l + def get_subcall_instr(self): if not self.lines: diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py index 3fbe1e22..ce6cf288 100644 --- a/miasm2/core/cpu.py +++ b/miasm2/core/cpu.py @@ -8,8 +8,8 @@ from pyparsing import * from miasm2.expression.expression import * from miasm2.core import asmbloc from collections import defaultdict -from bin_stream import bin_stream, bin_stream_str -from utils import Disasm_Exception +from miasm2.core.bin_stream import bin_stream, bin_stream_str +from miasm2.core.utils import Disasm_Exception from miasm2.expression.simplifications import expr_simp log = logging.getLogger("cpuhelper") @@ -1514,7 +1514,7 @@ class cls_mn(object): o = [] for c, v in candidates: o += v - o.sort(key=lambda x: len(x)) + o.sort(key=len) return o def value(self, mode): @@ -1564,7 +1564,7 @@ class cls_mn(object): if ((index, [xx[1].value for xx in to_decode]) in todo or (index, [xx[1].value for xx in to_decode]) in done): raise NotImplementedError('not fully functional') - continue + for p, f in to_decode: fnew = f.clone() o.append((p, fnew)) diff --git a/miasm2/core/parse_asm.py b/miasm2/core/parse_asm.py index f29a9839..dba097fa 100644 --- a/miasm2/core/parse_asm.py +++ b/miasm2/core/parse_asm.py @@ -2,7 +2,6 @@ #-*- coding:utf-8 -*- import re -import struct import miasm2.expression.expression as m2_expr from miasm2.core.asmbloc import * from miasm2.core.utils import pck |