diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2014-12-03 20:49:50 +0100 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2014-12-03 22:29:33 +0100 |
| commit | 8ba608cba23060502e600445108cdb46cd678df2 (patch) | |
| tree | a3c44f4828977a54ad162270ac3973a6d31c0415 /miasm2/jitter/jitload.py | |
| parent | 7c07c648f1ea895b8868435f17232fbdbb8bd0f7 (diff) | |
| download | miasm-8ba608cba23060502e600445108cdb46cd678df2.tar.gz miasm-8ba608cba23060502e600445108cdb46cd678df2.zip | |
BinStream: Unify BinStreams location
Diffstat (limited to '')
| -rw-r--r-- | miasm2/jitter/jitload.py | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/miasm2/jitter/jitload.py b/miasm2/jitter/jitload.py index 2135f40e..c297ba50 100644 --- a/miasm2/jitter/jitload.py +++ b/miasm2/jitter/jitload.py @@ -5,7 +5,7 @@ from miasm2.core import asmbloc from miasm2.jitter.csts import * from miasm2.core.utils import * -from miasm2.core.bin_stream import bin_stream +from miasm2.core.bin_stream import bin_stream_vm from miasm2.ir.ir2C import init_arch_C import logging @@ -32,41 +32,6 @@ except ImportError: log.error('cannot import jit python') -class bin_stream_vm(bin_stream): - - def __init__(self, vm, offset=0L, base_offset=0L): - self.offset = offset - self.base_offset = base_offset - self.vm = vm - - def getlen(self): - return 0xFFFFFFFFFFFFFFFF - - def getbytes(self, start, l=1): - try: - s = self.vm.get_mem(start + self.base_offset, l) - except: - raise IOError('cannot get mem ad', hex(start)) - return s - - def readbs(self, l=1): - try: - s = self.vm.get_mem(self.offset + self.base_offset, l) - except: - raise IOError('cannot get mem ad', hex(self.offset)) - self.offset += l - return s - - def writebs(self, l=1): - raise ValueError('writebs unsupported') - - def setoffset(self, val): - self.offset = val - - - - - class CallbackHandler(object): "Handle a list of callback" |