diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-11-27 12:58:04 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-12-04 15:59:24 +0100 |
| commit | 85bc9542a3c260595698f48b1de71a6da1d09ba7 (patch) | |
| tree | aa3e5dad2a3bce36e81c105c30c01993d71131bf | |
| parent | 7c74ea27685aabb51bf158b5ca13ce8fec147ef0 (diff) | |
| download | miasm-85bc9542a3c260595698f48b1de71a6da1d09ba7.tar.gz miasm-85bc9542a3c260595698f48b1de71a6da1d09ba7.zip | |
Jitter: fix cst exceptions
| -rw-r--r-- | miasm2/jitter/csts.py | 1 | ||||
| -rw-r--r-- | miasm2/jitter/jitload.py | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/miasm2/jitter/csts.py b/miasm2/jitter/csts.py index e4b315e1..7afd1d36 100644 --- a/miasm2/jitter/csts.py +++ b/miasm2/jitter/csts.py @@ -11,6 +11,7 @@ EXCEPT_INT_XX = (1 << 2) EXCEPT_BREAKPOINT_INTERN = (1 << 10) EXCEPT_ACCESS_VIOL = ((1 << 14) | EXCEPT_DO_NOT_UPDATE_PC) +EXCEPT_DIV_BY_ZERO = ((1 << 16) | EXCEPT_DO_NOT_UPDATE_PC) # VM Mngr constants PAGE_READ = 1 diff --git a/miasm2/jitter/jitload.py b/miasm2/jitter/jitload.py index a035445b..2335cc3c 100644 --- a/miasm2/jitter/jitload.py +++ b/miasm2/jitter/jitload.py @@ -144,12 +144,11 @@ class CallbackHandlerBitflag(CallbackHandler): Iterator on other results""" res = True - for b in self.callbacks: - - if b & bitflag != 0: + for bitflag_expected in self.callbacks: + if bitflag_expected & bitflag == bitflag_expected: # If the flag matched for res in super(CallbackHandlerBitflag, - self).call_callbacks(b, *args): + self).call_callbacks(bitflag_expected, *args): if res is not True: yield res |