diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2018-07-03 14:34:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-03 14:34:41 +0200 |
| commit | c0afde4d7c8ff51eaa31e4a074b9e06f080b3169 (patch) | |
| tree | 967c5856dcf37980cf80a2ea48cc7ee0e008e1bd /example/ida/depgraph.py | |
| parent | c7ca6a23768178dd49c8fe97d7c7b1e0be02cd2e (diff) | |
| parent | d314460a5a19be1f3334baedf0105d9b72fc8620 (diff) | |
| download | miasm-c0afde4d7c8ff51eaa31e4a074b9e06f080b3169.tar.gz miasm-c0afde4d7c8ff51eaa31e4a074b9e06f080b3169.zip | |
Merge pull request #787 from commial/feature/locationdb
LocationDB
Diffstat (limited to 'example/ida/depgraph.py')
| -rw-r--r-- | example/ida/depgraph.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/example/ida/depgraph.py b/example/ida/depgraph.py index 4320be8d..1ba7bee7 100644 --- a/example/ida/depgraph.py +++ b/example/ida/depgraph.py @@ -28,7 +28,7 @@ class depGraphSettingsForm(ida_kernwin.Form): self.address = idc.ScreenEA() cur_block = None for block in ira.getby_offset(self.address): - offset = self.ira.symbol_pool.loc_key_to_offset(block.loc_key) + offset = self.ira.loc_db.get_location_offset(block.loc_key) if offset is not None: # Only one block non-generated assert cur_block is None @@ -208,13 +208,13 @@ def launch_depgraph(): bs = bin_stream_ida() mdis = dis_engine(bs, dont_dis_nulstart_bloc=True) - ir_arch = ira(mdis.symbol_pool) + ir_arch = ira(mdis.loc_db) # Populate symbols with ida names for ad, name in idautils.Names(): if name is None: continue - mdis.symbol_pool.add_location(name, ad) + mdis.loc_db.add_location(name, ad) asmcfg = mdis.dis_multiblock(func.startEA) @@ -230,7 +230,7 @@ def launch_depgraph(): # Simplify affectations for irb in ir_arch.blocks.values(): irs = [] - offset = ir_arch.symbol_pool.loc_key_to_offset(irb.loc_key) + offset = ir_arch.loc_db.get_location_offset(irb.loc_key) fix_stack = offset is not None and settings.unalias_stack for assignblk in irb: if fix_stack: @@ -251,7 +251,7 @@ def launch_depgraph(): # Get dependency graphs dg = settings.depgraph graphs = dg.get(loc_key, elements, line_nb, - set([ir_arch.symbol_pool.getby_offset(func.startEA)])) + set([ir_arch.loc_db.get_offset_location(func.startEA)])) # Display the result comments = {} |