diff options
| author | Vladislav HrĨka <41523109+nofiv@users.noreply.github.com> | 2019-01-11 15:03:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-11 15:03:39 +0100 |
| commit | bd9d5e9cb16c26cad34fd6d563f47fc555660ce3 (patch) | |
| tree | ed44fb005afc15fc4416a36efd2006b50ad57bc6 | |
| parent | 914b9c443105f1bfbda97d1b7c01d901d561062c (diff) | |
| download | miasm-bd9d5e9cb16c26cad34fd6d563f47fc555660ce3.tar.gz miasm-bd9d5e9cb16c26cad34fd6d563f47fc555660ce3.zip | |
Update arch.py
Instruction prefix wasn't shown when to_string method was used since instruction_x86 used just the inherited one(https://github.com/cea-sec/miasm/blob/master/miasm2/arch/x86/arch.py#L452) from instruction(https://github.com/cea-sec/miasm/blob/master/miasm2/core/cpu.py#L997) which doesn't support these prefixes.
| -rw-r--r-- | miasm2/arch/x86/arch.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py index 77744ccd..11c1e00f 100644 --- a/miasm2/arch/x86/arch.py +++ b/miasm2/arch/x86/arch.py @@ -540,7 +540,10 @@ class instruction_x86(instruction): self.additional_info.prefixed = getattr(c, "prefixed", "") def __str__(self): - o = super(instruction_x86, self).__str__() + return self.to_string() + + def to_string(self, loc_db=None): + o = super(instruction_x86, self).to_string(loc_db) if self.additional_info.g1.value & 1: o = "LOCK %s" % o if self.additional_info.g1.value & 2: |