diff options
| author | Ajax <commial@gmail.com> | 2018-07-02 19:12:53 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2018-07-03 14:28:18 +0200 |
| commit | d314460a5a19be1f3334baedf0105d9b72fc8620 (patch) | |
| tree | 967c5856dcf37980cf80a2ea48cc7ee0e008e1bd /miasm2/jitter/jitcore.py | |
| parent | 68fac2e86cc61eba9adfe520fa0e04a7e8943450 (diff) | |
| download | miasm-d314460a5a19be1f3334baedf0105d9b72fc8620.tar.gz miasm-d314460a5a19be1f3334baedf0105d9b72fc8620.zip | |
Update symbol_pool's deprecated API -> LocationDB
Diffstat (limited to 'miasm2/jitter/jitcore.py')
| -rw-r--r-- | miasm2/jitter/jitcore.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/miasm2/jitter/jitcore.py b/miasm2/jitter/jitcore.py index 8084fe56..a26d4c9f 100644 --- a/miasm2/jitter/jitcore.py +++ b/miasm2/jitter/jitcore.py @@ -101,7 +101,7 @@ class JitCore(object): cur_block.ad_max = cur_block.lines[-1].offset + cur_block.lines[-1].l else: # 1 byte block for unknown mnemonic - offset = ir_arch.loc_db.loc_key_to_offset(cur_block.loc_key) + offset = ir_arch.loc_db.get_location_offset(cur_block.loc_key) cur_block.ad_min = offset cur_block.ad_max = offset+1 @@ -138,7 +138,7 @@ class JitCore(object): # Get the block if isinstance(addr, LocKey): - addr = self.ir_arch.loc_db.loc_key_to_offset(addr) + addr = self.ir_arch.loc_db.get_location_offset(addr) if addr is None: raise RuntimeError("Unknown offset for LocKey") @@ -253,13 +253,13 @@ class JitCore(object): try: for irblock in block.blocks: # Remove offset -> jitted block link - offset = self.ir_arch.loc_db.loc_key_to_offset(irblock.loc_key) + offset = self.ir_arch.loc_db.get_location_offset(irblock.loc_key) if offset in self.offset_to_jitted_func: del(self.offset_to_jitted_func[offset]) except AttributeError: # The block has never been translated in IR - offset = self.ir_arch.loc_db.loc_key_to_offset(block.loc_key) + offset = self.ir_arch.loc_db.get_location_offset(block.loc_key) if offset in self.offset_to_jitted_func: del(self.offset_to_jitted_func[offset]) @@ -293,7 +293,7 @@ class JitCore(object): @block: asmblock """ block_raw = "".join(line.b for line in block.lines) - offset = self.ir_arch.loc_db.loc_key_to_offset(block.loc_key) + offset = self.ir_arch.loc_db.get_location_offset(block.loc_key) block_hash = md5("%X_%s_%s_%s_%s" % (offset, self.arch_name, self.log_mn, |