From 23218d724ea08338f67400d078d4216505ef5eed Mon Sep 17 00:00:00 2001 From: feliam Date: Wed, 18 Oct 2017 19:17:26 -0300 Subject: [PATCH] Simple event signature fixes (#525) * dev-evm-event-bugfixes * Better stringifierer --- manticore/platforms/evm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manticore/platforms/evm.py b/manticore/platforms/evm.py index 3688917..e273dfb 100644 --- a/manticore/platforms/evm.py +++ b/manticore/platforms/evm.py @@ -808,9 +808,10 @@ class EVM(Eventful): policy='ALL') self._publish( 'will_decode_instruction', self.pc) + last_pc = self.pc current = self.instruction - self._publish( 'will_execute_instruction', current) + self._publish( 'will_execute_instruction', current) #Consume some gas self._consume(current.fee) @@ -825,7 +826,7 @@ class EVM(Eventful): for _ in range(current.pops): arguments.append(self._pop()) - self._publish( 'will_execute_instruction', current) + self._publish( 'did_execute_instruction', last_pc, self.pc, current) #simplify stack arguments for i in range(len(arguments)): @@ -1357,7 +1358,7 @@ class EVM(Eventful): m.append(c) hd = hexdump(m) - result = [] + result = ['-'*147] if issymbolic(self.pc): result.append( '') @@ -1387,7 +1388,6 @@ class EVM(Eventful): r = ' '*75 + hd[i] result.append(r) - result.append( '-'*147) result = [hex(self.address) +": "+x for x in result] return '\n'.join(result)